public ActionResult Edit(EmployeeTaskRating model) { try { // TODO: Add update logic here if (!ModelState.IsValid) { return(View(model)); } var EmployeeTaskRating = _mapper.Map <EmployeeTaskRating>(model); var isSuccess = _repo.Update(EmployeeTaskRating); if (!isSuccess) { ModelState.AddModelError("", "Something Went Wrong!"); return(View(model)); } return(RedirectToAction(nameof(Index))); } catch { ModelState.AddModelError("", "Something Went Wrong!"); return(View(model)); } }
public bool Delete(EmployeeTaskRating entity) { _db.EmployeeTaskRatings.Remove(entity); return(Save()); }
public bool Update(EmployeeTaskRating entity) { _db.EmployeeTaskRatings.Update(entity); return(Save()); }
public bool Create(EmployeeTaskRating entity) { _db.EmployeeTaskRatings.Add(entity); return(Save()); }