public ActionResult Edit(BookingExternal bookingexternal) { if (ModelState.IsValid) { db.Entry(bookingexternal).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.PropertyID = new SelectList(db.Properties, "PropertyID", "LegacyReference", bookingexternal.PropertyID); return View(bookingexternal); }
public ActionResult Create(BookingExternal bookingexternal) { if (ModelState.IsValid) { db.BookingExternals.Add(bookingexternal); db.SaveChanges(); return RedirectToAction("Create"); } ViewBag.PropertyID = new SelectList(db.Properties, "PropertyID", "LegacyReference", bookingexternal.PropertyID); return View(bookingexternal); }