public ActionResult Edit_Consultants(TBL_CONSULTANT objConslt) { ViewBag.departments = new SelectList(db.TBL_R_DEPT, "DEPT_ID", "DEPT_NAME"); db.Entry(objConslt).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Consultants")); }
public ActionResult Add_Consultants(TBL_CONSULTANT objConslt) { ViewBag.departments = new SelectList(db.TBL_R_DEPT, "DEPT_ID", "DEPT_NAME"); db.TBL_CONSULTANT.Add(objConslt); db.SaveChanges(); return(RedirectToAction("Consultants")); }