public ActionResult Edit(SearchHotel searchhotel) { if (ModelState.IsValid) { context.Entry(searchhotel).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index"); } return View(searchhotel); }
public ActionResult Create(SearchHotel searchhotel) { if (ModelState.IsValid) { context.SearchHotels.Add(searchhotel); context.SaveChanges(); return RedirectToAction("Index"); } return View(searchhotel); }