Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (MyDbContext dbContext = new MyDbContext())
- {
- using (TransactionScope txScope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
- {
- dbContext.Database.ExecuteSqlCommand("EXEC UpdateProc @Parm1 = 1;");
- var testObject = (from t in dbContext.TestTable where ID == 1 select t).FirstOrDefault();
- txScope.Complete();
- }
- }
Add Comment
Please, Sign In to add comment