Entity Framework - Generic Transaction Methods -


we're using transactions entity framework, might switching other orm in future. what's best way implement following...

begintransaction();  //some update/insert/delete operations here entity.name = "joe"; savechanges();  endtransaction(); 
  • we don't want use "using" statement
  • we need work nested transactions

you can use transactionscope ... , can nest in try/catch/finally if want to, though "using" statement easier. there specific reason don't want use "using"? i've used both quite success, , supports nested transactions.

  1. http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx
  2. http://msdn.microsoft.com/en-us/library/bb738523.aspx

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -