Exemplo n.º 1
0
        private static void RentalAddTest()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());

            rentalManager.Add(new Rental {
                CarId = 10, CustomerId = 2, RentDate = new DateTime(2021, 02, 05), ReturnDate = new DateTime(2021, 02, 10)
            });
        }
Exemplo n.º 2
0
        private static void AddTest(RentalManager rentalManager)
        {
            var result = rentalManager.Add(new Rental {
                ID = 1, CarID = 1, CustomerID = 1, RentDate = "16.02.2021", ReturnDate = "17.02.2021"
            });

            Console.WriteLine(result.Message);
        }
        private static void AddRental()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());
            var           rental1       = rentalManager.Add(new Rental {
                CarId = 1, CustomerId = 2, RentDate = new DateTime(2021, 1, 20)
            });
            var rental2 = rentalManager.Add(new Rental {
                CarId = 4, CustomerId = 1, RentDate = new DateTime(2021, 2, 10)
            });
            var rental3 = rentalManager.Add(new Rental {
                CarId = 1, CustomerId = 3, RentDate = DateTime.Today
            });

            Console.WriteLine(rental1.Message);
            Console.WriteLine(rental2.Message);
            Console.WriteLine(rental3.Message);
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            IRentalService _rentalManager = new RentalManager(new EfRentalDal());

            Console.WriteLine(_rentalManager.Add(new Rental {
                CarId = 2, CustomerId = 1, RentDate = new DateTime(2021, 01, 01), ReturnDate = new DateTime(2021, 02, 12)
            }).Message);
        }
Exemplo n.º 5
0
        private static void RentalAddTest(RentalManager rentalManager)
        {
            var myRental = new Rental {
                Id = 1, CarId = 1, CustomerId = 1, RentDate = new DateTime(2021, 4, 3)
            };

            rentalManager.Add(myRental);
        }
Exemplo n.º 6
0
        private static void RentACar()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());

            rentalManager.Add(new Rental {
                CarId = 5, CustomerId = 1, RentalDate = new DateTime(2021 / 02 / 18), ReturnDate = new DateTime(2021 / 03 / 01)
            });
        }
Exemplo n.º 7
0
        private static void addingRental(RentalManager rentalManager)
        {
            var result = rentalManager.Add(new Rental {
                CarId = 1006, CustomerId = 5, RentDate = new DateTime(2020, 02, 19), ReturnDate = new DateTime(2020, 02, 20)
            });

            Console.WriteLine(result.Message);
        }
Exemplo n.º 8
0
        private static void RentAdded(RentalManager rentalManager)
        {
            var result = rentalManager.Add(new Rental {
                CarId = 1, CustomerId = 1, RentalId = 1, RentDate = new DateTime(2021, 2, 20)
            });

            Console.WriteLine(result.Message);
        }
Exemplo n.º 9
0
        private static void RentalTest()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());

            rentalManager.Add(new Rental {
                CarId = 1, CustomerId = 1, RentDate = DateTime.Now, ReturnDate = DateTime.Now
            });
        }
Exemplo n.º 10
0
        // ************ Rental ************
        private static void AddRentalTest(Rental rental)
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());

            var result = rentalManager.Add(rental);

            Console.WriteLine(result.Message);
        }
Exemplo n.º 11
0
        static void Main(string[] args)
        {
            IRentalService rentalService = new RentalManager(new EfRentalDal());

            Console.WriteLine(rentalService.Add(new Rental {
                CarId = 8, CustomerId = 12, RentalId = 6, RentDate = new DateTime(2021, 02, 20), ReturnDate = new DateTime(2021, 02, 25)
            }).Message);
        }
Exemplo n.º 12
0
        private static void RentalTest()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());

            rentalManager.Add(new Rental {
                CarId = 2, CustomerId = 1, RentDate = DateTime.Now, ReturnDate = new DateTime(2021, 3, 1)
            });
            Console.WriteLine(rentalManager.GetAll().Data);
        }
Exemplo n.º 13
0
        public static void TestAddRental(RentalManager rentalManager)
        {
            //var Result = rentalManager.GetByRentalId(5);
            var Result = rentalManager.Add(new Rental {
                CarId = 1, CustomerId = 4, RentDate = new DateTime(2021, 1, 20, 10, 30, 00), ReturnDate = new DateTime(2021, 2, 1, 15, 00, 00)
            });

            Console.WriteLine(Result.Message);
        }
Exemplo n.º 14
0
        private static void RentCar()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());
            var           rentingCar1   = rentalManager.Add(new Rental
            {
                CarId      = 4,
                CustomerId = 2,
                RentDate   = DateTime.Now
            });
            var rentingCar2 = rentalManager.Add(new Rental
            {
                CarId      = 1,
                CustomerId = 2,
                RentDate   = DateTime.Now
            });

            Console.WriteLine($"Araba 1 kiralama durumu: {rentingCar1.Message}\nAraba 2 kiralama durumu: {rentingCar2.Message}");
        }
Exemplo n.º 15
0
        private static void RentalCRUD()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());

            rentalManager.Add(new Rental {
                Id = 2, CarId = 1, CustomerId = 1, RentDate = DateTime.Now
            });
            //rentalManager.GetAll();
        }
Exemplo n.º 16
0
        private static void RentalAddTest()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());
            var           result        = rentalManager.Add(new Rental {
                CarId = 1, CustomerId = 1, RentDate = new DateTime(2021, 02, 22), ReturnDate = new DateTime(2021, 02, 25)
            });

            Console.WriteLine(result.Message);
        }
Exemplo n.º 17
0
        private static void RentalTest()
        {
            RentalManager rental = new RentalManager(new EfRentalDal());
            var           result = rental.Add(new Rental {
                CarId = 8, CustomerId = 2, RentDate = DateTime.Now, ReturnDate = null
            });

            Console.WriteLine(result.Message);
        }
Exemplo n.º 18
0
        private static void AddRental()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());
            var           addedResult   = rentalManager.Add(new Rentals {
                CarID = 3, CustomerID = 1, RentDate = DateTime.Now
            });

            Console.WriteLine(addedResult.Message);
        }
Exemplo n.º 19
0
        private static void RentalAdd(RentalManager rentalManager)
        {
            var result = rentalManager.Add(new Rental
            {
                CarId = 5, CustomerId = 2, RentDate = DateTime.Now, ReturnDate = DateTime.Today
            }); // ReturnDate= Null verilirse araç kirada mesajı verir.

            Console.WriteLine(result.Message);
        }
Exemplo n.º 20
0
        private static void RentACar()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());
            var           result        = rentalManager.Add(new Rental {
                CustomerId = 2, CarId = 2
            }).Message;

            Console.WriteLine(result);
        }
Exemplo n.º 21
0
        private static void AddRental()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());
            var           result        = rentalManager.Add(new Rental {
                CarId = 1, CustomerId = 1, Id = 1, RentDate = (new DateTime(2025, 02, 03))
            });

            Console.WriteLine(result.Message);
        }
Exemplo n.º 22
0
        private static void RentalOperations()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());
            var           result        = rentalManager.Add(new Rental {
                CarId = 2, CustomerId = 2, RentDate = new DateTime(2021, 2, 12), ReturnDate = null
            });

            Console.WriteLine(result.Message);
        }
Exemplo n.º 23
0
        private static void RentalTest()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());
            Rental        rental        = new Rental {
                CarId = 1, CustomerId = 2, RentDate = DateTime.Now
            };

            Console.WriteLine(rentalManager.Add(rental).Message);
        }
Exemplo n.º 24
0
        private static void AddRentTest()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());
            var           result        = rentalManager.Add(new Rental {
                CarId = 3, CustomerId = 7, RentDate = new DateTime(2021, 2, 20)
            });

            Console.WriteLine(result.Message);
        }
Exemplo n.º 25
0
        private static void RentalAddTest()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());
            var           result        = rentalManager.Add(new Rental {
                CarId = 4, CustomerId = 2, RentDate = new DateTime(2015, 12, 01), ReturnDate = new DateTime(2020, 08, 18)
            });

            Console.WriteLine(result.Message);
        }
Exemplo n.º 26
0
        private static void RentalAdd(RentalManager rentalManager)
        {
            Console.WriteLine("Recap araç kiralama kayıt.\n");
            var addedResult = rentalManager.Add(new Rental {
                CustomerId = 1, CarId = 3, RentDate = DateTime.Now
            });

            Console.WriteLine(addedResult.Message);
        }
Exemplo n.º 27
0
        private static void RentalAdd(RentalManager rentalManager)
        {
            var rental = rentalManager.Add(new Rental {
                RentalId = 3, CarId = 1, CustomerId = 2, ReturnDate = new DateTime(2021, 02, 12),
                RentDate = DateTime.Today
            });

            Console.WriteLine(rental.Message);
        }
Exemplo n.º 28
0
        private static void RentalOperations(CarManager carManager, RentalManager rentalManager)
        {
            Rental rental1 = new Rental {
                CustomerId = 1, RentDate = DateTime.Now, CarId = 6
            };

            rentalManager.Add(rental1);
            ListRentDetails(rentalManager);
        }
Exemplo n.º 29
0
        private static void RentalAddTest()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());
            var           result        = rentalManager.Add(new Rental {
                CarId = 1, CustomerId = 1, RentDate = DateTime.Now
            });

            Console.WriteLine(result.Message);
        }
Exemplo n.º 30
0
        private static void RentalAdded()
        {
            RentalManager rentalManager = new RentalManager(new EfRentalDal());

            rentalManager.Add(new Rental {
                Id = 1, CarId = 1, CustomerId = 1, RentDate = new DateTime(2021, 02, 14), ReturnDate = new DateTime(2021, 02, 25)
            });
            Console.WriteLine();
        }