abe545 / CodeOnlyStoredProcedures

A library for easily calling Stored Procedures in .NET using only code (no xml or gui).
MIT License
4 stars 3 forks source link

Executing via dynamic syntax will not throw SQL exceptions if there are no results #59

Closed abe545 closed 8 years ago

abe545 commented 8 years ago

This is easy to demonstrate:

Throws as expected:

Task<IEnumerable<int>> t = db.ExecuteAsync().usp_DoUknownStoredProcedure();

Does not throw:

Task t = db.ExecuteAsync().usp_DoUknownStoredProcedure();

The same behavior is exhibited with await: Throws as expected:

IEnumerable<int> r = await db.ExecuteAsync().usp_DoUknownStoredProcedure();

Does not throw:

await db.ExecuteAsync().usp_DoUknownStoredProcedure();