public ActionResult DeleteConfirmed(int id) { buildModel buildModel = db.Builds.Find(id); db.Builds.Remove(buildModel); db.SaveChanges(); return(RedirectToAction("Index")); }
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)); }
public ActionResult UserCreate(buildModel build) { if (ModelState.IsValid) { db.Builds.Add(build); db.SaveChanges(); return(RedirectToAction("listOfBuildsByHero", new { id = build.HeroID })); } return(View(build)); }
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)); }
// 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)); }