public ActionResult Edit(Team team) { if (ModelState.IsValid) { context.Entry(team).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index"); } return View(team); }
public ActionResult Create(Team team) { if (ModelState.IsValid) { context.Teams.Add(team); context.SaveChanges(); return RedirectToAction("Index"); } return View(team); }