예제 #1
0
        async Task IStartDataService.AddCitiesFrom()
        {
            await _cityFromRepository.Add(new CityFrom { City = "Минск" });

            await _cityFromRepository.Add(new CityFrom { City = "Москва" });

            await _cityFromRepository.Add(new CityFrom { City = "Киев" });
        }
예제 #2
0
        async Task <CityFromDTO> IService <CityFromDTO, int> .Add(CityFromDTO entity)
        {
            CityFrom cityFrom = await _cityFromRepository.Add(_mapper.Map <CityFromDTO, CityFrom>(entity));

            return(_mapper.Map <CityFrom, CityFromDTO>(cityFrom));
        }