private static void ListCars() { var cars = _service.GetCars(); Console.WriteLine("{0,-2} | {1,-10} | {2,-13} | {3,-13} | {4,-10}", "ID", "Plate", "Manufacturer", "Model", "PricePerDay"); Console.WriteLine("---------------------------------------------------------------------------------"); foreach (var car in cars) { Console.WriteLine(String.Format("{0,-2} | {1,-10} | {2,-13} | {3,-13} | {4,-10}", car.CarID, car.Plate, car.Manufacturer, car.Model, car.PricePerDay)); } Console.WriteLine("---------------------------------------------------------------------------------"); }
private void LoadData() { Cars = new ObservableCollection <Car>(carDataService.GetCars()); }