views:

715

answers:

3

Can anyone recommend good tutorial on repository and Unit Of Work pattern usage for TransactionScope class with Linq ops.in C#?

+5  A: 

Have a look at the ncommon project, it implements the unit of work pattern with your choice of orm - nhibernate, linq to sql and entity framework, you choose what flavour you like. Ritesh Rao is the main developer and can be found blooging here

Jake Scott
i need a simple example.but ncommon is a project :)
tobias
Yeah the examples are in project in the unit tests and there are examples in the blog :)
Jake Scott
A: 

Thought I'd throw this out there for everyone, this guy has a very simple TransactionScope tutorial. Even shows you how to exclude transactions from the transaction.

Dan
A: 

This is a great example of unit of work implementation in the context of Domain Drive Design. The source code is available, but is only explained in the book. Some discussion can be found here:

http://dddpds.codeplex.com/Thread/View.aspx?ThreadId=68753

Igor Zevaka