예제 #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);
        }
예제 #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));
        }