private void MarquesList() { Mq = new MarquesMVVM(); ExamensEntities MyEntity = new ExamensEntities(); var data = (from mqt in MyEntity.Marques select mqt).ToList(); Mq.LMarques = new ObservableCollection <Marques>(data); }
private void InitVoituresList() { Vt = new VoituresMVVM(); ExamensEntities MyEntity = new ExamensEntities(); var data = (from clt in MyEntity.Voitures select clt).ToList(); Vt.LvVoitures = new ObservableCollection <Voitures>(data); }
private void ListeMarques_SelectionChanged(object sender, SelectionChangedEventArgs e) { ListView lm = sender as ListView; Marques mqt = lm.SelectedItem as Marques; var mqid = mqt.MarqueId; ExamensEntities MyEntity = new ExamensEntities(); Mq.SelectedMarques = (from clte in MyEntity.Marques where clte.MarqueId == mqt.MarqueId select clte).First(); }