Esempio n. 1
0
        public async Task <CategoryView> Put(int id, CategoryUpdateView model)
        {
            var category = _mapper.Map <Category>(model);

            var result = await _categoryService.UpdateAsync(id, category);

            return(_mapper.Map <CategoryView>(result));
        }
Esempio n. 2
0
        public async Task <CategoryView> UpdateAsync(int id, CategoryUpdateView model)
        {
            var url = string.Format(_apiOptions.Category, id.ToString());

            return(await _httpClientService.PutJsonAsync <CategoryView>(url, model));
        }