public ActionResult DeleteConfirmed(int id) { CentralStore centralStore = db.CentralStores.Find(id); db.CentralStores.Remove(centralStore); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Item,Class,Price,CreatedDate,IsDeleted")] CentralStore centralStore) { if (ModelState.IsValid) { db.Entry(centralStore).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(centralStore)); }
public ActionResult Create([Bind(Include = "Id,Item,Class,Price,CreatedDate,IsDeleted")] CentralStore centralStore) { if (ModelState.IsValid) { db.CentralStores.Add(centralStore); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(centralStore)); }
// GET: CentralStores/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CentralStore centralStore = db.CentralStores.Find(id); if (centralStore == null) { return(HttpNotFound()); } return(View(centralStore)); }