public void findCar(dbHelper db) { Console.Write("Car's brand:\n"); string brand = Console.ReadLine(); List <Car> cars = new List <Car> { }; db.findCar(brand, cars); Console.Read(); Console.Read(); }
public void findCarById(dbHelper db) { Console.Write("Car's id:\n"); string location = Console.ReadLine(); Car car = db.findCar(location); if (car != null) { Console.Write(car.id + " " + car.location + "\n"); } else { Console.Write("Car doesn't exist\n"); } Console.Read(); Console.Read(); }