public ActionResult DeleteConfirmed(int id) { ThursdayBars thursdayBars = db.ThursdayBars.Find(id); db.ThursdayBars.Remove(thursdayBars); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "BarsID,BarName,Specials,DaytimeBusyness,EveningBusyness,NightTimeBusyness,AdditionalFeatures")] ThursdayBars thursdayBars) { if (ModelState.IsValid) { db.Entry(thursdayBars).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(thursdayBars)); }
// GET: Thursday/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ThursdayBars thursdayBars = db.ThursdayBars.Find(id); if (thursdayBars == null) { return(HttpNotFound()); } return(View(thursdayBars)); }