Пример #1
0
        public IActionResult DeleteCategory(Guid id)
        {
            var categoryObj = _repository.GetCategory(id);

            if (!_repository.DeleteCategory(categoryObj.Id))
            {
                ModelState.AddModelError("", $"Something went wrong when deleting the this record {categoryObj.Id}");
            }

            return(Ok(categoryObj));
        }