public ActionResult DeltePub(int id) { Publication p1 = new Publication() { PublishedId = id, EmployeeId = Convert.ToInt32(Session["EmpId"]) }; p1.DeletePublication(); return(RedirectToAction("Index")); }