public void OnGet() { //If the string is Null, it will Get all the guests if (String.IsNullOrEmpty(FilterCriteria)) { Guests = guestService.GetGuests(); } else//If the string is not null, it will filter them out { Guests = guestService.FilterGuestsByAddress(FilterCriteria); } }
public async Task <IHttpActionResult> GetGuests() { var guests = await _service.GetGuests(); return(Ok(guests)); }
public async Task <IActionResult> GetAllGuests() { return(Ok(await _service.GetGuests())); }