public ActionResult Delete(int id) { EmployDetail employee = db.EmployDetails.Find(id); db.EmployDetails.Remove(employee); db.SaveChanges(); return(RedirectToAction("List")); }
public ActionResult Edit(EmployDetail employeeDetail) { if (ModelState.IsValid) { db.Entry(employeeDetail).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("List")); } return(View(employeeDetail)); }
public ActionResult Create(EmployDetail employeeDetail) { if (ModelState.IsValid) { db.EmployDetails.Add(employeeDetail); db.SaveChanges(); return(RedirectToAction("List")); } return(View(employeeDetail)); }
public ActionResult Edit(int id) { EmployDetail product = db.EmployDetails.Find(id); return(View()); }