public ActionResult DeleteConfirmed(int id) { Flavor thisFlavor = _db.Flavors.FirstOrDefault(flavor => flavor.FlavorId == id); _db.Remove(thisFlavor); _db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { Treat thisTreat = _db.Treats.FirstOrDefault(treat => treat.TreatId == id); _db.Remove(thisTreat); _db.SaveChanges(); return(RedirectToAction("Index")); }