Beispiel #1
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     System.Windows.Data.CollectionViewSource personViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("personViewSource")));
     // Load data by setting the CollectionViewSource.Source property:
     dbContext = new PropertyMgr2ModelContainer();
     dbContext.People.Where(p => (p.Apartments1.Count > 0)).Load();
     personViewSource.Source = dbContext.People.Local;
     dbContext.Configuration.AutoDetectChangesEnabled = true;
 }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     buildingViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("buildingViewSource")));
     // Load data by setting the CollectionViewSource.Source property:
     dbContext = new PropertyMgr2ModelContainer();
     dbContext.Buildings.Load();
     buildingViewSource.Source = dbContext.Buildings.Local;
     dbContext.Configuration.AutoDetectChangesEnabled = true;
 }