private static void RentalTest() { RentalManager rentalManager = new RentalManager(new EfRentalDal()); var result = rentalManager.CheckReturnDate(1); Console.WriteLine(result.Message); var result2 = rentalManager.UpdateReturnDate(1); Console.WriteLine(result2.Message); }
private static void TestRentalSuccess(int arac) { RentalManager rentalManager = new RentalManager(new EfRentalDal()); var result = rentalManager.CheckReturnDate(arac); Console.WriteLine("talep edilen Arac Id:" + arac); if (result.Success == false) { Console.WriteLine(result.Message); } else { Console.WriteLine("-------------------------"); Console.WriteLine(result.Message); } }
private static void TestRentalSuccess(int arac) { RentalManager rentalManager = new RentalManager(new EfRentalDal()); var result = rentalManager.CheckReturnDate(arac); RentalManager rentalManager2 = new RentalManager(new EfRentalDal()); var result2 = rentalManager2.GetRentalDetailsDto(arac); Console.WriteLine("talep tarihi:" + DateTime.Now); Console.WriteLine("talep edilen Arac Id:" + arac); if (result.Success == true) { Console.WriteLine(result.Message); } else { Console.WriteLine("-------------------------"); Console.WriteLine(result.Message); } }
static void Main(string[] args) { CarManager carManager = new CarManager(new EfCarDal()); BrandManager brandManager = new BrandManager(new EfBrandDal()); ColorManager colorManager = new ColorManager(new EfColorDal()); CustomerManager customerManager = new CustomerManager(new EfCustomerDal()); UserManager userManager = new UserManager(new EfUserDal()); RentalManager rentalManager = new RentalManager(new EfRentalDal()); customerManager.Add(new Customer { Id = 1, CompanyName = "Tesla" }); customerManager.Add(new Customer { Id = 1, CompanyName = "Amazon" }); customerManager.Add(new Customer { Id = 1, CompanyName = "Trendyol" }); //userManager.Add(new User { Email = "*****@*****.**", FirstName = "Rümeysa", LastName = "Yük", Password = 123456, }); //userManager.Add(new User { Email = "*****@*****.**", FirstName = "Ahmet", LastName = "Tas", Password = 7895 }); //userManager.Add(new User { Email = "*****@*****.**", FirstName = "Nuriye", LastName = "Ulsak", Password = 896321 }); //userManager.Add(new User { Email = "yalı[email protected]", FirstName = "Kemal", LastName = "atcı", Password = 7852 }); var result = carManager.GetCarDetails(); if (result.Success) { foreach (var cust in result.Data) { Console.WriteLine("{0} -- {1} -- {2}", cust.BrandName, cust.ColorName, cust.DailyPrice); } } else { Console.WriteLine(result.Message); } var result2 = customerManager.GetAllCustomers(); foreach (var re in result2.Data) { Console.WriteLine(re.CompanyName); } var result4 = rentalManager.CheckReturnDate(23 / 11 / 2021); foreach (var item in result4.Message) { Console.WriteLine("Araç kıralanabilir"); } //var result5 = userManager.GetAllUsers(); //foreach (var item in result5.Data) //{ // Console.WriteLine(item.Email+item.FirstName+item.LastName+item.Password); //} //Test(carManager, brandManager, colorManager); //Test2(brandManager, colorManager); }