public ActionResult <List <BreweryEvent> > GetEvents(bool byBrewery = false, int breweryId = 0, bool byFavorites = false, int userId = 0) { List <BreweryEvent> events = null; if (byBrewery == false && byFavorites == false) { events = eventDAO.GetEvents(); } else if (byBrewery == false && byFavorites == true) { events = eventDAO.GetEvents(userId); } else { events = eventDAO.GetEventsByBrewery(breweryId); } return(Ok(events)); }
/// <summary> /// Get all the events from the web service /// </summary> /// <returns></returns> public static async Task <ObservableCollection <Event> > GetEvents() { return(await eService.GetEvents()); }