public static bool GetBoolean(this DbDataRecord dr, string columnName)
        {
            Check.ArgNotNull(dr, nameof(dr));
            int ordinal = dr.GetOrdinal(columnName);

            return(dr.GetBoolean(ordinal));
        }
示例#2
0
 public static bool GetBoolean(this DbDataRecord rec, string fieldName)
 {
     return(rec.GetBoolean(rec.GetOrdinal(fieldName)));
 }
 public static bool GetBoolean(this DbDataRecord rec, string fieldName)
 {
     return(rec.GetBoolean(rec.GetOrdinal(fieldName)));
     // Or this one....
     //return !(rec.GetValue(rec.GetOrdinal(fieldName)) == (object)0);
 }