Exemple #1
0
 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));
        }
Exemple #3
0
 public async Task <IActionResult> GetAllGuests()
 {
     return(Ok(await _service.GetGuests()));
 }