Calling SP from EF using same transaction of SaveChanges
Does someone knows how to call a StoredProc using the same transaction of an objectContext SaveChanges method (EntityFramework 5)? The goal is to apply the objects changes and call a stored Proc that does some "magic" on the DB, but, if something goes wrong (either with the SaveChanges or with the SP execution) no changes would be committed at all. Steps: Create the context get the connection from the context Create the transaction (TransactionScope) Open the connection (will enlist the connection into the ambient transaction created in 3. and will prevent from closing the connection by the