Guest User

Untitled

a guest
Dec 14th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. using (MyDbContext dbContext = new MyDbContext())
  2. {
  3. using (TransactionScope txScope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
  4. {
  5. dbContext.Database.ExecuteSqlCommand("EXEC UpdateProc @Parm1 = 1;");
  6. var testObject = (from t in dbContext.TestTable where ID == 1 select t).FirstOrDefault();
  7.  
  8. txScope.Complete();
  9. }
  10. }
Add Comment
Please, Sign In to add comment