public static Int64?GetInt64OrNull(this READER reader, int ordinal) { if (reader.IsDBNull(ordinal)) { return(null); } else { return(reader.GetInt64(ordinal)); } }
public static Int64 GetInt64OrDefault(this READER reader, int ordinal) => reader.IsDBNull(ordinal) ? default : reader.GetInt64(ordinal);
private static User GetUser(NpgsqlDataReader reader) { return new User { Id = reader.GetInt64(0), Name = reader.GetString(1), Description = reader.GetString(2), Photo = reader.GetByteArray(3), Enabled = reader.GetBoolean(4), CanChange = reader.GetBoolean(5), Privilege = reader.GetNullableInt32(6) }; }