public async Task <Dbo.Country> Create(Dto.Country country) { Validated.NotNull(country, nameof(country)); Dbo.Country addedCountry = this.unitOfWork.Countries.Add(mapper.Map(country)); await this.unitOfWork.SaveChanges(); return(addedCountry); }
public Dbo.Country Map(Dto.Country country) { if (country == null) { return(null); } return(new Dbo.Country { CountryId = country.Id, Name = country.Name }); }