public ActionResult Edit(EmployeeProjectAttendance model) { try { // TODO: Add update logic here if (!ModelState.IsValid) { return(View(model)); } var EmployeeProjectAttendance = _mapper.Map <EmployeeProjectAttendance>(model); var isSuccess = _repo.Update(EmployeeProjectAttendance); 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(EmployeeProjectAttendance entity) { _db.EmployeeProjectAttendances.Remove(entity); return(Save()); }
public bool Update(EmployeeProjectAttendance entity) { _db.EmployeeProjectAttendances.Update(entity); return(Save()); }
public bool Create(EmployeeProjectAttendance entity) { _db.EmployeeProjectAttendances.Add(entity); return(Save()); }