Dapper doesn’t return value from try-catch in stored procedure
I have a strange situation. I have an existing stored procedure that returns a data back, everything works fine until sql exception occured. When SQL exception occured and this even handled by begin catch
, but Dapper for some reason throws an exception Sequence contains no elements
. Then I replaced QuerySingleAsync<T>
to QueryAsync
to be able to see the sql result itself. It helped to mute the exception (that was generated by Dapper mapper), but result
came back empty. I can’t understand why Dapper doing this way.