public static CityViewModel CityFromDtoToView(CityDTO cityDTO) { CityViewModel cityVM = new CityViewModel { CityId = cityDTO.CityId, CityName = cityDTO.CityName, CountryId = cityDTO.CountryId, Population = cityDTO.Population }; return(cityVM); }
public static CityDTO CityFromViewToDto(CityViewModel cvm) { CityDTO cityDto = new CityDTO { CityId = cvm.CityId, CityName = cvm.CityName, CountryId = cvm.CountryId, Population = cvm.Population }; return(cityDto); }