public Category ToCategory(InsertCategoryRequestDto insertCategoryRequestDto) { return(new Category() { Type = insertCategoryRequestDto.Type }); }
public IHttpActionResult InsertCategory(InsertCategoryRequestDto productRequestDto) { Category category = _categoryMapper.ToCategory(productRequestDto); category.Id = _categoryService.InsertCategory(category); return(Created($"category/{category.Id}", _categoryMapper.ToDto(category))); }