public async Task <ActionResult <CreateDistrict> > PostRegion(CreateDistrict DistrictDto) { var district = _mapper.Map <District>(DistrictDto); var result = await _districtsService.Add(district); return(CreatedAtAction("GetDistrict", new { id = result.Id }, result)); }
public District Post([FromBody] District district) { _districtsService.Add(district); return(district); }