コード例 #1
0
        public async Task <IActionResult> AddCategory(CategoryDTO category)
        {
            bool res      = _goodsService.AddCategory(category);
            var  response = new ContentResult();

            if (res)
            {
                response.Content = "successfully added";
            }
            else
            {
                response.Content = "Exception occured. Try again";
            }

            return(response);
        }