private static Pet ReadPet(IDataRecord reader) { return(new Pet { PetId = (int)reader.GetValue(0), PetName = (string)reader.GetValue(1), PetType = EnumUtil.ConvertToEnum <PetType>((string)reader.GetValue(2)), DateOfBirth = (DateTime)reader.GetValue(3), PetOwnerId = (int)reader.GetValue(4) }); }