Ejemplo n.º 1
0
        public async Task <ActionResult <CountryDto> > AddCountry([FromBody] Country country)
        {
            await _repository.AddAsync(country);

            await _repository.CommitAsync();

            return(CreatedAtAction(nameof(GetCountry),
                                   new { id = country.CountryId },
                                   country.Adapt <CountryDto>()));
        }