public ActionResult Edit([Bind(Include = "PlayerPositionId,Position,Description")] PlayerPosition playerPosition) { if (ModelState.IsValid) { db.Entry(playerPosition).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(playerPosition)); }
public ActionResult Edit([Bind(Include = "HonourId,Image,Award,Amount,Season,Type")] Honour honour) { if (ModelState.IsValid) { db.Entry(honour).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(honour)); }
public ActionResult Edit([Bind(Include = "CompetitionId,Name")] Competition competition) { if (ModelState.IsValid) { db.Entry(competition).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(competition)); }
public ActionResult Edit([Bind(Include = "TeamId,Name")] Team team) { if (ModelState.IsValid) { db.Entry(team).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(team)); }
public ActionResult Edit([Bind(Include = "ManagerId,Image,FirstName,LastName,DOB,Nationality,Period")] Manager manager) { if (ModelState.IsValid) { db.Entry(manager).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(manager)); }
public ActionResult Edit([Bind(Include = "FixtureId,Date,Stadium,HomeTeam,HomeScore,AwayScore,AwayTeam,CompetitionId")] Fixture fixture) { if (ModelState.IsValid) { db.Entry(fixture).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CompetitionId = new SelectList(db.Competitions, "CompetitionId", "Name", fixture.CompetitionId); return(View(fixture)); }
public ActionResult Edit([Bind(Include = "PlayerId,Image,FirstName,LastName,Age,Nationality,SquadNumber,PlayerPositionId,TeamId")] Player player) { if (ModelState.IsValid) { db.Entry(player).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PlayerPositionId = new SelectList(db.PlayerPositions, "PlayerPositionId", "Position", player.PlayerPositionId); ViewBag.TeamId = new SelectList(db.Teams, "TeamId", "Name", player.TeamId); return(View(player)); }