Entity Framework + Repository + Unit of Work

added by Velcrow
8/9/2011 4:08:29 AM

348 Views

The topic of this post is presentation an implementation of two quite popular data access patterns – Repository and Unit of Work – in Entity Framework.


2 comments

vijayst
8/9/2011 4:09:22 AM
Unit of Work is something that looks interesting. I have a XML based application. I am looking for something like transactions that can commit or rollback a block of actions. Unit of Work pattern is something that I can implement.

dpeterson
8/11/2011 6:32:24 PM
You should also note that the unit of work pattern is implemented in the EF context classes, as well as NHibernate's Session object.
I would recommend picking up a copy of Martin Fowler's book http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420
He covers these sort of design patterns in detail, and explores when they are most useful.