private void ConfigureGrid()
 {
     using var repo = new CarRepo(_context);
     // Build a LINQ query that gets back some data from the Inventory table.
     gridInventory.ItemsSource = repo.GetAllIgnoreQueryFilters().ToList()
                                 .Select(x => new { x.Id, Make = x.MakeName, x.Color, x.PetName });
 }
Example #2
0
        public MainWindowViewModel()
        {
            ApplicationDbContext context = ConfigurationHelpers.GetContext(ConfigurationHelpers.GetConfiguration());
            ICarRepo             carRepo = new CarRepo(context);

            Cars = new ObservableCollection <Car>(carRepo.GetAllIgnoreQueryFilters());
        }