예제 #1
0
        public IHttpActionResult Get()
        {
            LeagueService service = CreateLeagueService();
            var           leagues = service.GetAllLeagues();

            return(Ok(leagues));
        }
예제 #2
0
        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;
            }
        }