public ActionResult Create([Bind(Include = "ID,Name,Title,Race,Class,Description,Level,Player")] PC pC)
        {
            if (ModelState.IsValid)
            {
                db.PCs.Add(pC);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(pC));
        }
Esempio n. 2
0
        public ActionResult Create([Bind(Include = "ID,Name")] Adventure adventure)
        {
            if (ModelState.IsValid)
            {
                db.Adventures.Add(adventure);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(adventure));
        }