This question is locked. New answers and comments are not allowed.
Hi Guys,
If I have a stored procedure which does an insert, I know OA wraps this call in a transaction and so you need to call SaveChanges for this to commit. What happens if the sproc fails (for whatever reason) - Will this automatically rollback or do you need to explicity do this in the catch statement or does the using finaliser handle this? I want to know if there is a possibility that an open transaction is left?
Many thanks
Mike
If I have a stored procedure which does an insert, I know OA wraps this call in a transaction and so you need to call SaveChanges for this to commit. What happens if the sproc fails (for whatever reason) - Will this automatically rollback or do you need to explicity do this in the catch statement or does the using finaliser handle this? I want to know if there is a possibility that an open transaction is left?
using
(CoreContext dbContext =
new
CoreContext())
{
dbContext.MyStoredProcedure(parameters);
dbContext.SaveChanges();
}
Many thanks
Mike