LINQ to SQL as a unit of work

From your experience, is LINQ to SQL suitable as a unit of work? can this be avoided? Should I, say, NHibernate or another O / RM tool?

Thanks Lucian

+4
source share
1 answer

The Linq to Sql data context is intended for use in a single unit of work.

Edit: add links.

Linq To SQL FAQs:

Q: Should I create a new DataContext in each business logic method?

A: DataContext follows the unit of work design pattern. If you do not move data between physical layers between each operation, you must keep your DataContext for the duration of the work.

+4
source

All Articles