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

When a column is not found, it now throws an IndexOutOfRangeException #28

Closed abe545 closed 9 years ago

abe545 commented 9 years ago

I thought I had tests for this, but they apparently aren't catching it.

abe545 commented 9 years ago

Ugh, the SqlDataReader's implementation of GetOrdinal throws this exception when the name isn't found. This is not documented, so it looks like I'm going to have to go the other way: iterate over the FieldCount and call GetName to match the properties of the model.