private async void Page_Loaded(object sender, RoutedEventArgs e) { Times = await LinesRepos.GetTimesOfStation(direction, station.Id); TimesGridView.ItemsSource = Times; StationNameTB.Text = station.NameAR; DirectionTB.Text = direction == Station.Directions.SM ? "Sousse to Mahdia" : "Mahdia to Sousse"; }
private async Task <List <DateTime?> > GetAvailableTimesOfStation(Station.Directions direction, int stationId) { var times = await LinesRepos.GetAvailableTimesOfStation(direction, stationId); return(Task.FromResult(times).Result); }