public IHttpActionResult Get() { LeagueService service = CreateLeagueService(); var leagues = service.GetAllLeagues(); return(Ok(leagues)); }
public async Task GetLeagues() { try { IsRefreshing = true; var leagues = await LeagueService.GetAllLeagues(); Leagues = new ObservableCollection <League>(leagues); IsRefreshing = false; } catch (Exception e) { throw e.InnerException; } }