public async Task <IActionResult> Index(int hotel) { //return RedirectToAction("Results", new { hotels }); var result = await _hotel.GetAllHotels(); return(View(result)); }
/// <summary> /// This GET action returns all table data to the Index page /// </summary> /// <returns>The result of an action method</returns> public async Task <IActionResult> Index(string searchString) { if (!String.IsNullOrEmpty(searchString)) { return(View(await _hotel.SearchHotels(searchString))); } return(View(await _hotel.GetAllHotels())); }
public IHttpActionResult Get() { var hotels = _hotelManager.GetAllHotels().AsEnumerable(); if (!hotels.Any()) { return(NotFound()); } else { return(Ok(hotels)); } }
public async Task <ActionResult <IEnumerable <HotelDTO> > > GetHotels() { return(await _hotels.GetAllHotels()); }
public List <Hotels> GetAllHotel() { List <Hotels> resultlist = _hotelManager.GetAllHotels(); return(resultlist); }
// GET: api/Booking public List <Hotel> GetHotels() { var hotel = _IHotelManager.GetAllHotels(); return(hotel); }
public async Task <IActionResult> Index() { var result = await _hotel.GetAllHotels(); return(View(result)); }
public IHttpActionResult GetHotels() { return(Ok(_hotelManager.GetAllHotels())); }