private static CityDTO GenerateCity(SqlDataReader reader, CityDTO city) { city.SetId(Convert.ToInt32(reader["cityID"])); city.SetCity(Convert.ToString(reader["cityName"])); city.SetZip(Convert.ToString(reader["zipCode"])); return(city); }
private static AddressDTO GenerateAddress(SqlDataReader reader, AddressDTO address, CityDTO city) { city.SetId(Convert.ToInt32(reader["cityID"])); address.SetCity(city); address.SetID(Convert.ToInt32(reader["addressID"])); address.SetStreetName(reader["streetName"].ToString()); address.SetStreetNo(reader["streetNo"].ToString()); address.SetType(reader["addressType"].ToString()); return(address); }