This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I would like to get the functionality to discard pending changes in the UOW. The transactions method depends on the db provider and not working everywhere and it is excessive. Needed simple functionality to do this:
There is a workaround to create inner UOW like this:
... but it is unnecessary to create additional db connection. Needed something dumb and simple, to discard, and continue working with the same UOW. |
|
|
Wouldn't uow.Detach() do what you want? |
|
|
James's suggestion is right, to evict an entity from the UnitOfWork call UnitOfWork.Detach(entity). To do this for everything in the identity map you can enumerate the UnitOfWork e.g.
|
|
|
Thanks, that's what I need. |
|