public ActionResult Edit(Assignment assignment) { if (ModelState.IsValid) { db.Entry(assignment).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(assignment); }
public ActionResult Create(Assignment assignment) { if (ModelState.IsValid) { db.Assignments.Add(assignment); db.SaveChanges(); return RedirectToAction("Index"); } return View(assignment); }
public void RemoveAssignment(Assignment assignment) { Assignments.Remove(assignment); }
public void AddAssignment(Assignment assignment) { Assignments.Add(assignment); }