Пример #1
0
        public async Task <IActionResult> AddCategory([FromBody] AddCategoryPostModel postModel)
        {
            try
            {
                await _navigationService.AddCategory(postModel.ParentCategoryId, postModel.CategoryName, postModel.CategoryDescription);

                return(Json(0)); //success
            }
            catch
            {
                return(Json(1)); //exception
            }
        }