private void ConfigureGrid() { using (var repo = new CarRepo()) { //Build a LINQ query that gets back some data from the Inventory table gridInventory.ItemsSource = repo.GetAll().Select(x => new { x.CarId, x.Make, x.Color, x.CarNickName }); } }
private static void PrintAllInventory() { using (var repo = new CarRepo()) { foreach (Car c in repo.GetAll()) { WriteLine(c); } } }
public IEnumerable <Car> GetNewestCars() { int _year = carRepository.GetAll().Max(x => x.year); return(carRepository.GetByCondition(z => z.year == _year)); }