I'm dynamically picking a table to select from and there's one field that doesn't exist on all of the tables. Inside my reader, how can I check to see if that field exists in the collection?
I'm using this, but it only determines if it's null...not whether it exists or not:
if (myReader.GetValue(myReader.GetOrdinal("PrePay")) != DBNull.Value)
myModel.PrePay = myReader.GetBoolean(myReader.GetOrdinal("PrePay"));