private void Window_Loaded(object sender, RoutedEventArgs e) { // récupération des matchs BusinessLayer.JediTournamentManager tm = new BusinessLayer.JediTournamentManager(); IList<JediTournamentEntities.Match> listMatches = tm.GetMatchs().ToList<JediTournamentEntities.Match>(); IList<JediTournamentEntities.Jedi> listJedis = tm.GetJedis().ToList<JediTournamentEntities.Jedi>(); // Initialisation du viewModel ViewModel.GestionMatchsViewModel mvm = new ViewModel.GestionMatchsViewModel(listMatches); gmatchsListView.DataContext = mvm; }
private void Window_Loaded(object sender, RoutedEventArgs e) { // récupération des matchs BusinessLayer.JediTournamentManager tm = new BusinessLayer.JediTournamentManager(); IList <JediTournamentEntities.Match> listMatches = tm.GetMatchs().ToList <JediTournamentEntities.Match>(); IList <JediTournamentEntities.Jedi> listJedis = tm.GetJedis().ToList <JediTournamentEntities.Jedi>(); // Initialisation du viewModel ViewModel.GestionMatchsViewModel mvm = new ViewModel.GestionMatchsViewModel(listMatches); gmatchsListView.DataContext = mvm; }