Ejemplo n.º 1
0
        private static void AddCar()
        {
            CarProductManager car1 = new CarProductManager(new EfCarDal());

            car1.Add(new Car {
                Id = 5, BrandId = 2, ColorId = 3, DailyPrice = 100, Description = "c*k guzel", ModelYear = 1996, CarName = "Kia",
            });

            CarProductManager car2 = new CarProductManager(new EfCarDal());

            car2.Add(new Car {
                Id = 6, ColorId = 5, DailyPrice = 300, Description = "fena", ModelYear = 2005, CarName = "Opel", BrandId = 2
            });
        }
Ejemplo n.º 2
0
        private static void CarAddTest()
        {
            Console.WriteLine("Yeni araç kaydı  \n");

            CarProductManager carProductManager = new CarProductManager(new EfCarProductDal());

            carProductManager.Add(
                new Car {
                Id = 3, BrandId = 3, ColorId = 3, CarName = "Skoda", ModelYear = 2019, DailyPrice = 800000, Description = "Sıfır"
            }

                );

            foreach (Car car in carProductManager.GetAll().Data)
            {
                Console.WriteLine(" Id: " + car.Id + "\n Marka Id: " + car.BrandId + "\n Renk Id: " + car.ColorId + "\n Araç adı: " + car.CarName + "\n Araç açıklama: " + car.Description + " \n Araç kiralama günlük fiyat: " + car.DailyPrice + "\n Araç model tarihi: " + car.ModelYear);
            }
        }