public ActionResult Create(BookingType bookingtype) { if (ModelState.IsValid) { db.BookingTypes.Add(bookingtype); db.SaveChanges(); return RedirectToAction("Index"); } return View(bookingtype); }
public ActionResult Edit(BookingType bookingtype) { if (ModelState.IsValid) { db.Entry(bookingtype).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(bookingtype); }