示例#1
0
        public ActionResult Delete(int id)
        {
            var apiResult = TryExecute(() =>
            {
                _certificationRepository.Delete(id);
                _unitOfWork.Commit();
                return(true);
            }, "Certification deleted sucessfully");

            return(Json(apiResult, JsonRequestBehavior.AllowGet));
        }
示例#2
0
 public ActionResult Delete(Certification c)
 {
     try
     {
         certificationRepository.Delete(c);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }
 public ActionResult DeleteConfirmed(int id)
 {
     _certificationRepository.Delete(id);
     _unitOfWork.Commit();
     return(RedirectToAction("Index"));
 }
示例#4
0
 public void Delete(CertificationDto entity)
 {
     repo.Delete(entity);
 }