public void insertCar(dbHelper db) { Console.Write("Add new car:\n"); Console.Write("id:\n"); string id = Console.ReadLine(); Console.Write("brand:\n"); string brand = Console.ReadLine(); Console.Write("model:\n"); string model = Console.ReadLine(); Console.Write("price:\n"); int price; try { price = Convert.ToInt32(Console.ReadLine()); } catch (Exception e) { price = 100; } Console.Write("location:\n"); string location = Console.ReadLine(); Car car = new Car(); db.insertCar(id, brand, model, price, location, car); Console.Read(); Console.Read(); }