Geeks With Blogs


Currently Reading

CLR via C#m
Under The Influence(of code) Abhijeet Patel's blog May 2009 Entries
Using multiple Object Contexts in a Transaction
The scenario: You have 2 Entity Models, and you need to call operations on the ObjectContext of each of them, the operations should be atomic, in that either both operations should succeed or fail so that your databases are consistent. This is fairly straightforward to accomplish using a TransactionScope. ObjectServices is smart enough to detect if the ObjectContext is in a surrounding TransactionScope and if so,use that scope. NOTE:If a scope is not specified, then ObjectContext by default creates ......

Posted On Wednesday, May 13, 2009 11:58 PM

Copyright © Abhijeet Patel | Powered by: