public async Task <CategoryView> Post(CategoryCreateView model) { var category = _mapper.Map <Category>(model); var result = await _categoryService.AddAsync(category); return(_mapper.Map <CategoryView>(result)); }
public async Task <CategoryView> AddAsync(CategoryCreateView model) { return(await _httpClientService.PostJsonAsync <CategoryView>(_apiOptions.Categories, model)); }