public ActionResult Edit([Bind(Include = "Id,Name,TeamId,Deleted")] Player player)
 {
     if (ModelState.IsValid)
     {
         db.Entry(player).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.TeamId = new SelectList(db.Teams, "Id", "Name", player.TeamId);
     return(View(player));
 }
 public ActionResult Edit([Bind(Include = "Id,MatchTime,MatchPlace,Status,HostTeamId,HostTeamResult,GuestTeamId,GuestTeamResult,Deleted")] Match match)
 {
     if (ModelState.IsValid)
     {
         db.Entry(match).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.HostTeamId  = new SelectList(db.Teams, "Id", "Name", match.HostTeamId);
     ViewBag.GuestTeamId = new SelectList(db.Teams, "Id", "Name", match.GuestTeamId);
     return(View(match));
 }
Esempio n. 3
0
 public void Update(Match match)
 {
     context.Entry(match).State = EntityState.Modified;
 }
Esempio n. 4
0
 public void Update(PlayerOnMatch playerOnMatch)
 {
     context.Entry(playerOnMatch).State = EntityState.Modified;
 }
Esempio n. 5
0
 public void Update(Player player)
 {
     context.Entry(player).State = EntityState.Modified;
 }
 public void Update(Team team)
 {
     context.Entry(team).State = EntityState.Modified;
 }