Exemplo n.º 1
0
        public ActionResult Create(GameType gametype)
        {
            if (ModelState.IsValid)
            {
                db.GameTypes.Add(gametype);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(gametype);
        }
Exemplo n.º 2
0
 public ActionResult Edit(GameType gametype)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gametype).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(gametype);
 }