Esempio n. 1
0
 public ActionResult Edit([Bind(Include = "Title,Description,Capacity,Length,RunStart,RunEnd")] Game game)
 {
     if (ModelState.IsValid)
     {
         db.Entry(game).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(game));
 }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,Start,Price,SoldOut,Title,Color")] Session session)
 {
     if (ModelState.IsValid)
     {
         db.Entry(session).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Title = new SelectList(db.Games, "Title", "Tag", session.Title);
     return(View(session));
 }