public ActionResult Edit([Bind(Include = "ProjectId,ProjectName,ProjectDesc")] Project project)
 {
     if (ModelState.IsValid)
     {
         db.Entry(project).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(project));
 }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,EmpId,ProjectId")] EmployeeProject employeeProject)
 {
     if (ModelState.IsValid)
     {
         db.Entry(employeeProject).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(employeeProject));
 }
Beispiel #3
0
 public ActionResult Edit([Bind(Include = "EmpId,lastName,firstName")] Employee employee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(employee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(employee));
 }