Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }