Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            buildModel buildModel = db.Builds.Find(id);

            db.Builds.Remove(buildModel);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "Id,Hero,Item1,Item2,Item3,Item4,Item5,Item6,MoonShardEaten,level")] buildModel buildModel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(buildModel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(buildModel));
 }
Exemple #3
0
 public ActionResult UserCreate(buildModel build)
 {
     if (ModelState.IsValid)
     {
         db.Builds.Add(build);
         db.SaveChanges();
         return(RedirectToAction("listOfBuildsByHero", new { id = build.HeroID }));
     }
     return(View(build));
 }
Exemple #4
0
        public ActionResult Create([Bind(Include = "Id,Hero,Item1,Item2,Item3,Item4,Item5,Item6,MoonShardEaten,level")] buildModel buildModel)
        {
            if (ModelState.IsValid)
            {
                db.Builds.Add(buildModel);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(buildModel));
        }
Exemple #5
0
        // GET: buildModels/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            buildModel buildModel = db.Builds.Find(id);

            if (buildModel == null)
            {
                return(HttpNotFound());
            }
            return(View(buildModel));
        }