Object reference not set to an instance of an object. Below is the Action to Update public ActionResult disUpdate(Employee eid) { if (ModelState.IsValid) { Empmaster ed1 = db.Empmasters.Where(u => u.Emp_Id == eid.EmployeeID).SingleOrDefault(); ed1.Category = eid.Category; ed1.Emp_Name = eid.ename; ed1.Father_Husband_Name = eid.fname; ed1.departmet = eid.dept; ed1.designation = eid.des; ed1.doj = eid.doj; ed1.dob = eid.dob; ed1.sex = eid.sex; ed1.mstatus = eid.mstatus; ed1.address = eid.address; ed1.status = Convert.ToChar(eid.status); db.SubmitChanges(); return View("Index"); } else { return View(); } }