public ActionResult DeleteConfirmed(int id) { HotelsType hotelsType = hotelTypeRepository.Find(id); hotelTypeRepository.Remove(hotelsType); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IdHotelsType,HotelType")] HotelsType hotelsType) { if (ModelState.IsValid) { hotelTypeRepository.Modified(hotelsType); return(RedirectToAction("Index")); } return(View(hotelsType)); }
// GET: HotelsTypes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HotelsType hotelsType = hotelTypeRepository.Find(id); if (hotelsType == null) { return(HttpNotFound()); } return(View(hotelsType)); }