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