Exemplo n.º 1
0
 public Category ToCategory(InsertCategoryRequestDto insertCategoryRequestDto)
 {
     return(new Category()
     {
         Type = insertCategoryRequestDto.Type
     });
 }
Exemplo n.º 2
0
        public IHttpActionResult InsertCategory(InsertCategoryRequestDto productRequestDto)
        {
            Category category = _categoryMapper.ToCategory(productRequestDto);

            category.Id = _categoryService.InsertCategory(category);
            return(Created($"category/{category.Id}", _categoryMapper.ToDto(category)));
        }