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