LINQ to SQL and Transactions
Posted by: Rick Strahls WebLog,
on 14 Jul 2009 |
View original | Bookmarked: 0 time(s)
LINQ to SQL handles a lot of functionality out of the box for you, including the ability to perform updates under transaction contexts for you transparently. If you modify, add or delete instances of entities the changes are updated in the context of a transaction when SubmitChanges() is called. This covers a wide range of operations and this is as it should be for an ORM: Transactions should be handled mostly transparently. Every once in a while though you may need to perform some update tasks...