I have a DbContext
configured using options.UseSqlServer()
.
I have a few dozen stored procedure calls defined in the DbContext. They all look something like this:
await Database.ExecuteSqlRawAsync("exec dbo.spDoMyVeryTailoredProcedure");
None of them arrive in the execution strategy Execute
or ExecuteAsync
methods. This prevents all errors produced in stored procedures from being handled by the execution strategy's resiliency logic and explicit logging instructions.
Is there a way to properly inject error handling into these SQL executions?