Beispiel #1
0
        public async Task <IActionResult> AddCategoryToShop([FromBody] AddCategoryToShopDto addcategoryToShopDto)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var itemModel = dtoMapper.Map <AddCategoryToShopDto, ShopCategory>(addcategoryToShopDto);
            await shopService.AddCategoryToShop(itemModel);

            return(Ok("Category has added to shop"));
        }