/// <summary> /// Run controller /// </summary> public void RunController() { var rents = _collectionContext.LoadRents(); var vehicleTypes = _collectionContext.LoadTypes(); var vehicles = _collectionContext.LoadVehicles(rents, vehicleTypes); _collectionContext.UserCollection = new Collections(vehicleTypes, vehicles, _outputService); _collectionContext.UserCollection.Print(); _collectionContext.UserCollection.Vehicles.Add ( new(7, _collectionContext.UserCollection.VehicleTypes[3], new DieselEngine(4.75, 20.1, 135), "МТЗ 40", "2268 AB-2", 1200, 2020, 109, Colors.Blue) { Rents = new List <Rent> { new Rent(7, DateTime.Now, 13.5m) }, }