I'm going to write 'Unit of Work', please help me find out all gimmicks
Posted
by o..o
on Stack Overflow
See other posts from Stack Overflow
or by o..o
Published on 2009-10-16T20:14:55Z
Indexed on
2010/03/21
1:51 UTC
Read the original article
Hit count: 532
design-patterns
|unit-of-work
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 :)
© Stack Overflow or respective owner