public static T Read <T>(this System.Data.SqlClient.SqlDataReader reader, string column) { var columnIndex = reader.GetOrdinal(column); if (reader.IsDBNull(columnIndex)) { return(default(T)); } return(reader.GetFieldValue <T>(columnIndex)); }