public ActionResult Edit([Bind(Include = "TeamName,City,Province")] Team team) { if (ModelState.IsValid) { db.Entry(team).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(team)); }
public ActionResult Edit([Bind(Include = "Id,First_Name,Last_Name,Position,Number,Goals,Assists,City,Team_Name")] Retired_Players retired_Players) { if (ModelState.IsValid) { db.Entry(retired_Players).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(retired_Players)); }
public ActionResult Edit([Bind(Include = "Id,Name")] Conference conference) { if (ModelState.IsValid) { db.Entry(conference).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(conference)); }
public ActionResult Edit([Bind(Include = "PlayerId,LastName,FirstName,Position,TeamName")] Player player) { if (ModelState.IsValid) { db.Entry(player).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.TeamName = new SelectList(db.Teams, "TeamName", "City", player.TeamName); return(View(player)); }
public ActionResult Edit([Bind(Include = "Id,Name,Conference_Id")] Division division) { if (ModelState.IsValid) { db.Entry(division).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Conference_Id = new SelectList(db.Conferences, "Id", "Name", division.Conference_Id); return(View(division)); }
public ActionResult Edit([Bind(Include = "Id,First_Name,Last_Name,Position,Number,Goals,Assists,Salary,Team_Id")] Player player) { if (ModelState.IsValid) { db.Entry(player).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Team_Id = new SelectList(db.Teams, "Id", "City", player.Team_Id); return(View(player)); }
public ActionResult Edit([Bind(Include = "Id,City,Name,Points,Conference_Id,Division_Id")] Team team) { if (ModelState.IsValid) { db.Entry(team).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Conference_Id = new SelectList(db.Conferences, "Id", "Name", team.Conference_Id); ViewBag.Division_Id = new SelectList(db.Divisions, "Id", "Name", team.Division_Id); return(View(team)); }