Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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));
        }