public ActionResult DeleteConfirmed(int id) { AmazingFeatures amazingFeatures = db.AmazingFeatures.Find(id); db.AmazingFeatures.Remove(amazingFeatures); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Icon,Name")] AmazingFeatures amazingFeatures) { if (ModelState.IsValid) { db.Entry(amazingFeatures).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(amazingFeatures)); }
public ActionResult Create([Bind(Include = "Id,Icon,Name")] AmazingFeatures amazingFeatures) { if (ModelState.IsValid) { db.AmazingFeatures.Add(amazingFeatures); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(amazingFeatures)); }
// GET: Admin/AmazingFeature/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AmazingFeatures amazingFeatures = db.AmazingFeatures.Find(id); if (amazingFeatures == null) { return(HttpNotFound()); } return(View(amazingFeatures)); }