Пример #1
0
        public ActionResult Delete(int id)
        {
            var apiResult = TryExecute(() =>
            {
                _ticketCategoryRepository.Delete(id);
                _unitOfWork.Commit();
                return(true);
            }, "Ticket Category deleted sucessfully");

            return(Json(apiResult, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public void deleteCategory(int id)
        {
            TicketCategory cat = categoryRepo.GetById(id);

            categoryRepo.Delete(cat);
        }