public static CountryDto ToDto(this DataAccess.Models.Country item) { CountryDto dto = null; if (item != null) { dto = item.ToBasicDto() as CountryDto; dto.Cities = item.City.ToBasicDto() as List <CityDto>; } return(dto); }
public static CountryUIDto ToUIDto(this DataAccess.Models.Country item) { CountryUIDto dto = null; if (item != null) { dto = new CountryUIDto { Id = item.Id, Name = item.Name }; } return(dto); }