public async Task <SubcategoryView> Post(SubcategoryCreateView model)
        {
            var subcategory = _mapper.Map <Subcategory>(model);

            var result = await _subcategoryService.AddAsync(subcategory);

            return(_mapper.Map <SubcategoryView>(result));
        }
Example #2
0
 public async Task <SubcategoryView> AddAsync(SubcategoryCreateView model)
 {
     return(await _httpClientService.PostJsonAsync <SubcategoryView>(_apiOptions.Subcategories, model));
 }