public async Task UpdateAsync([BindRequired, FromRoute] Guid id, [FromForm] LocationCreateUpdateModel animalUpdateModel) { var animalModel = _mapper.Map <LocationCreateUpdateModel, LocationModel>(animalUpdateModel); animalModel.Id = id; await UpdateDataAsync(_locationService, id, animalModel, _mapper); }
public async Task <ActionResult <LocationModel> > CreateItemAsync([FromForm] LocationCreateUpdateModel createModel) { var model = _mapper.Map <LocationCreateUpdateModel, LocationModel>(createModel); return(await CreatedItemAsync <LocationDto, LocationModel, Guid>(_locationService, model, _mapper)); }