public string DeleteCategory(string id) { var questCat = _repo.GetQuestCatByCatId(id); if (questCat != null) { throw new Exception("This has a majestic Quest Cat! You shall not delete!"); } var deleted = _repo.DeleteQuestCat(id); if (deleted) { var success = _repo.Delete(id); if (!success) { throw new Exception("This category too STRONK! Unable to delete the category."); } } return(id); }