public ActionResult Update(Certification certification) { ApiResult <Certification> apiResult; if (ModelState.IsValid) { if (certification.Id > 0) { apiResult = TryExecute(() => { _certificationRepository.Update(certification); _unitOfWork.Commit(); return(certification); }, "Certification updated sucessfully"); } else { apiResult = TryExecute(() => { _certificationRepository.Create(certification); _unitOfWork.Commit(); return(certification); }, "Certification created sucessfully"); } } else { apiResult = ApiResultFromModelErrors <Certification>(); } return(Json(apiResult, JsonRequestBehavior.AllowGet)); }
public ActionResult Edit(Certification certification) { if (ModelState.IsValid) { _certificationRepository.Update(certification); _unitOfWork.Commit(); return(RedirectToAction("Index")); } return(View(certification)); }
public int UpdateCertification(DLModel.Certification _certification) { return(_certificationRepository.Update((DLModel.Certification) new DLModel.Certification().InjectFrom(_certification))); }
public void Update(CertificationDto entity) { repo.Update(entity); }