public async Task <Dbo.City> Create(Dto.City city) { Validated.NotNull(city, nameof(city)); Dbo.City addedCity = this.unitOfWork.Cities.Add(mapper.Map(city)); await this.unitOfWork.SaveChanges(); return(addedCity); }
public Dbo.City Map(Dto.City city) { if (city == null) { return(null); } return(new Dbo.City { CityId = city.Id, Name = city.Name }); }
public Dto.City Map(Dbo.City city) { if (city == null) { return(null); } var result = new Dto.City { Id = city.CityId, Name = city.Name }; return(result); }