public static dto.Address ToDTO(this bll.Address bll) { dto.Address dto = new dto.Address(); dto.Id = bll.Id; dto.Street = bll.Street; dto.Number = bll.Number; dto.Box = bll.Box; dto.CityId = bll.City.Id; return(dto); }
public static bll.Address ToBLL(this dto.Address dto) { bll.Address bll = new bll.Address(dto.CityId); bll.Id = dto.Id; bll.Street = dto.Street; bll.Number = dto.Number; bll.Box = dto.Box; //bll.City = cities.Get(dto.CityId); return(bll); }