public ActionResult Edit(GameFilter gamefilter)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gamefilter).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(gamefilter));
 }
Example #2
0
 public ActionResult Edit(Team team)
 {
     if (ModelState.IsValid)
     {
         db.Entry(team).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(team));
 }
 public ActionResult Edit(GameResult gameresult)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gameresult).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.GameSpreadId = new SelectList(db.GameSpreads, "GameSpreadId", "GameSpreadId", gameresult.GameSpreadId);
     ViewBag.WinnerTeamId = new SelectList(db.Teams, "TeamId", "TeamLongName", gameresult.WinnerTeamId);
     return(View(gameresult));
 }