static void Main(string[] args) { //CarManager carManager = InMemoryCarManager(); //AddCarWithCarManager(); //BrandOperations(); //CarManager carManager = new CarManager(new EfCarDal()); //GetCarDetailsOperation(); RentalManager rentalManager = new RentalManager(new EfRentalDal()); Rental rental = new Rental() { CarId = 1, CustomerId = 1, RentDate = DateTime.Now.AddDays(-10), ReturnDate = DateTime.Now.AddDays(-5), }; Console.WriteLine("deneme1"); rentalManager.AddRental(rental); Console.WriteLine("deneme2"); Console.ReadKey(); }
private static void AddRentals(Rental rentals) { RentalManager rentalsManager = new RentalManager(new EfRentalDal()); var result = rentalsManager.AddRental(rentals); Console.WriteLine(result.Message); }
private static void arabaKirala(RentalManager rentalManager) { Rental rental = new Rental { CarID = 1, CustomerID = 1, RentalDate = DateTime.Now, RentalID = 1 }; rentalManager.AddRental(rental); }
private static void Rent() { Rental rent1 = new Rental { CarId = 2, CustomerId = 3, RentDate = new DateTime(2020, 2, 14), ReturnDate = new DateTime(2021, 1, 15) }; RentalManager rentalManager = new RentalManager(new EfRentalDal()); Console.WriteLine(rentalManager.AddRental(rent1).Message); }