I'm going to write 'Unit of Work', please help me find out all gimmicks
- by o..o
Hi everybody,
I'm going to write my own DAL in C#. I decided to use 'Unit of Work' pattern (next mentioned as uow) with request as a scope and Identity map stored in HttpContext.Items.
I have right now question about implementing of CRUD methods. How/where are they implemented? Are they implemented in every single business class (as in active records pattern) or are implemented somehow in uow class (if so, how)?
I also suppose that I need to use as the scope not just the request, but also the db connection. But how? Should I open the connection a the start of the request and close it on uow disposing?
Every advice is strongly appreciated, especially Your "real world" experiences.
Thank you all :)