sql server - Making EF saveChanges and more stored procedure call (with commit at the end) into a unit of work -


i using entity framework in application, doing changes , after calling savechanges 1 time @ end required unit of work. part of logic asked implement using existing stored procedures (it not me). made research , test , noticed savechanges , stored procedures not run @ same transaction on db side.

so tried use this:

using (var scope = new transactionscope(transactionscopeoption.required)) {     //doing changes ef, calling stored procedures     ...     db.savechanges();     scope.complete(); } 

it working in test if stored procedures not contain commit. problem procedures have use has commit. there way make work (without modifying stored procedures)?


Comments