Exemplo n.º 1
0
        public ActionResult Create([Bind(Include = "ID,question1Score,question2Score,question3Score,question4Score,question5Score,question6Score,question7Score,question8Score,question9Score,question10Score,questionScore,totalScore")] Survey survey)
        {
            if (ModelState.IsValid)
            {
                db.Surveys.Add(survey);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(survey));
        }
Exemplo n.º 2
0
        public ActionResult Create([Bind(Include = "ID,size,superHeroName")] Shirt shirt)
        {
            if (ModelState.IsValid)
            {
                db.Shirts.Add(shirt);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(shirt));
        }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "ID,ToyName,superHeroName")] Toy toy)
        {
            if (ModelState.IsValid)
            {
                db.Toys.Add(toy);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(toy));
        }
Exemplo n.º 4
0
        public ActionResult Create([Bind(Include = "ID,Title,Genre,superHeroName")] VideoGame videoGame)
        {
            if (ModelState.IsValid)
            {
                db.VideoGames.Add(videoGame);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(videoGame));
        }
Exemplo n.º 5
0
        public ActionResult Create([Bind(Include = "ID,crateName")] Crate crate)
        {
            if (ModelState.IsValid)
            {
                db.Crate.Add(crate);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(crate));
        }
Exemplo n.º 6
0
        public ActionResult Create([Bind(Include = "ID,superHeroName")] BobbleHead bobbleHead)
        {
            if (ModelState.IsValid)
            {
                db.BobbleHeads.Add(bobbleHead);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(bobbleHead));
        }