public async Task <ActionResult> DeleteConfirmed(int id) { VenueBookingDescription venueBookingDescription = await db.venueBookingDescription.FindAsync(id); db.venueBookingDescription.Remove(venueBookingDescription); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "DescriptionID,booking_Description")] VenueBookingDescription venueBookingDescription) { if (ModelState.IsValid) { db.Entry(venueBookingDescription).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(venueBookingDescription)); }
public async Task <ActionResult> Create([Bind(Include = "DescriptionID,booking_Description")] VenueBookingDescription venueBookingDescription) { if (ModelState.IsValid) { db.venueBookingDescription.Add(venueBookingDescription); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(venueBookingDescription)); }
// GET: VenueBookingDescriptions/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VenueBookingDescription venueBookingDescription = await db.venueBookingDescription.FindAsync(id); if (venueBookingDescription == null) { return(HttpNotFound()); } return(View(venueBookingDescription)); }