Example #1
0
        static void Main(string[] args)
        {
            CarManager carManager = new CarManager(new EfCarDal());
            Car        newCar     = new Car()
            {
                CarName     = "Tofas",
                CarId       = 5,
                BrandId     = 3,
                ColorId     = 3,
                DailyPrice  = 130.0m,
                ModelYear   = 2007,
                Description = "Gri Tofaş Hasarlı"
            };

            //carManager.Add(newCar);


            Console.WriteLine("-----Brand ID --------");
            foreach (var item in carManager.GetAllByBrandId(3))
            {
                Console.WriteLine(item.CarName);
            }
            Console.WriteLine("-----Color ID --------");
            foreach (var item in carManager.GetAllByColorId(3))
            {
                Console.WriteLine(item.CarName);
            }
        }
Example #2
0
        private static void FilterColor(CarManager carManager, BrandManager brandManager, ColorManager colorManager)
        {
            var result = carManager.GetAllByColorId(5);

            if (result.Success == true)
            {
                Console.WriteLine("\n---Rent A Car--- \t\t Filter: Color[Yeşil]\n");
                Console.WriteLine("Car Id\tBrand\t\tColor\t\tModel\t\tPrice\tDescription");
                Console.WriteLine("------\t-----\t\t-----\t\t-----\t\t-----\t-----------");
                foreach (Car car in result.Data)
                {
                    Console.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}",
                                      car.CarId,
                                      brandManager.GetById(car.BrandId).Data.BrandName,
                                      colorManager.GetById(car.ColorId).Data.ColorName,
                                      car.ModelYear,
                                      car.DailyPrice,
                                      car.Description);
                }
            }
            else
            {
                Console.WriteLine(result.Message);
            }
        }
Example #3
0
        private static void EfCarTest()
        {
            CarManager carManager = new CarManager(new EfCarDal());

            carManager.Add(new Car {
                Id = 18, Description = "aanana", DailyPrice = -5
            });
            Console.WriteLine("\n");

            var result = carManager.GetAll();

            if (result.Success == true)
            {
                foreach (var car in result.Data)
                {
                    Console.WriteLine(car.Description + "\nGünlük Kirası: " + car.DailyPrice);
                }
            }

            Console.WriteLine("\nSiyah Renkli Arabalar\n");

            var result2 = carManager.GetAllByColorId(4);

            if (result.Success == true)
            {
                foreach (var car in result2.Data)
                {
                    Console.WriteLine(car.Description + "\nGünlük Kirası: " + car.DailyPrice);
                }
            }
        }
Example #4
0
        static void Main(string[] args)
        {
            CarManager   carManager   = new CarManager(new EfCarDal());
            BrandManager brandManager = new BrandManager(new EfBrandDal());
            ColorManager colorManager = new ColorManager(new EfColorDal());

            Car car1 = new Car {
                BrandId = 1, Brand = "Honda", ColorId = 1, Id = 2, DailyPrice = 120, Description = "Vtec", ModelYear = "2020"
            };
            Car car2 = new Car {
                BrandId = 2, Brand = "Toyota", ColorId = 3, Id = 4, DailyPrice = 150, Description = "VVti", ModelYear = "2021"
            };
            Brand brand1 = new Brand()
            {
                BrandId = 2, BrandName = "Bmw"
            };
            Color color1 = new Color()
            {
                ColorId = 8, ColorName = "Red"
            };

            List <Car> Cars = new List <Car> {
                car1, car2
            };

            Console.WriteLine("Araçlar");
            foreach (var car in carManager.GetAll())
            {
                Console.WriteLine(car.Id, car.ColorId, car.BrandId, car.DailyPrice, car.Description);
            }

            foreach (var cars in carManager.GetAllByBrandId(1))
            {
                Console.WriteLine(car1.Id, car1.Description);
            }
            foreach (var cars2 in carManager.GetAllByColorId(1))
            {
                Console.WriteLine(cars2.ColorId, cars2.Description, cars2.DailyPrice);
            }

            foreach (var details in carManager.GetCarDetails())
            {
                Console.WriteLine(details.Id, details.BrandId, details.BrandName, details.ColorName, details.DailyPrice, details.Description);
            }
            brandManager.Add(new Brand {
                BrandName = "Mercedes"
            });
            colorManager.Add(new Color {
                ColorName = "Blue"
            });


            {
            }
        }
Example #5
0
        static void Main(string[] args)
        {
            CarManager carManager = new CarManager(new EfCarDal());

            foreach (var car in carManager.GetAll())
            {
                Console.WriteLine("{0}, {1} TL, {2} model", car.Description, car.DailyPrice, car.ModelYear);
            }

            Console.WriteLine("**********************************");

            foreach (var car in carManager.GetAllByBrandId(1))
            {
                Console.WriteLine("{0}, {1} TL, {2} model", car.Description, car.DailyPrice, car.ModelYear);
            }

            Console.WriteLine("**********************************");

            foreach (var car in carManager.GetAllByColorId(1))
            {
                Console.WriteLine("{0}, {1} TL, {2} model", car.Description, car.DailyPrice, car.ModelYear);
            }

            Console.WriteLine("**********************************");


            Console.WriteLine(carManager.GetById(2).Description);


            Console.WriteLine("**********************************");

            /*Console.WriteLine("Seçilen araba: {0} ", carManager.GetById(1).Description);
             *
             * Console.WriteLine("**********************************");
             *
             * foreach (var car in carManager.GetAllByBrandId(1))
             * {
             *  Console.WriteLine("{0}, {1} TL, {2} model", car.Description, car.DailyPrice, car.ModelYear);
             * }
             *
             * Console.WriteLine("**********************************");
             *
             * foreach (var car in carManager.GetAllByColorId(2))
             * {
             *  Console.WriteLine("{0}, {1} TL, {2} model", car.Description, car.DailyPrice, car.ModelYear);
             * }*/



            Console.ReadKey();
        }
        static void Main(string[] args)
        {
            CarManager   carManager   = new CarManager(new EfCarDal());
            ColorManager colorManager = new ColorManager(new EfColorDal());
            BrandManager brandManager = new BrandManager(new EfBrandDal());

            carManager.Add(new Car {
                Id = 1, BrandId = 2, ColorId = 1, DailyPrice = 400, Description = "bmw", ModelYear = 2020
            });
            carManager.Add(new Car {
                Id = 2, BrandId = 4, ColorId = 3, DailyPrice = 450, Description = "audi", ModelYear = 2014
            });
            carManager.Add(new Car {
                Id = 3, BrandId = 5, ColorId = 1, DailyPrice = 755, Description = "volkswagen", ModelYear = 2010
            });
            carManager.Add(new Car {
                Id = 4, BrandId = 2, ColorId = 4, DailyPrice = 7000, Description = "bmw2", ModelYear = 2000
            });
            carManager.Update(new Car {
                Id = 4, BrandId = 2, ColorId = 4, DailyPrice = 7000, Description = "bmw3", ModelYear = 2000
            });
            carManager.Delete(new Car {
                Id = 2, BrandId = 4, ColorId = 3, DailyPrice = 450, Description = "audi", ModelYear = 2014
            });
            carManager.Update(new Car {
                Id = 3, BrandId = 5, ColorId = 1, DailyPrice = 755, Description = "volkswagen", ModelYear = 2010
            });
            foreach (var car in carManager.GetAllByBrandId(2))
            {
                Console.WriteLine(car.Description);
            }
            Console.WriteLine("*********");
            foreach (var car in carManager.GetAllByColorId(1))
            {
                Console.WriteLine(car.Description);
            }
            Console.WriteLine("*********");

            foreach (var car in carManager.GetAll())
            {
                Console.WriteLine(car.Description);
            }

            colorManager.Add(new Color {
                Id = 1, Name = "red"
            });
            brandManager.Add(new Brand {
                Id = 1, Name = "subaru"
            });
        }
Example #7
0
        private static void CarTestByColor(CarManager carManager)
        {
            var result = carManager.GetAllByColorId(2);

            AttributeDesign();
            if (result.Success)
            {
                foreach (var car in result.Data)
                {
                    Console.WriteLine($"{car.CarId}\t   {car.BrandId}\t\t   {car.ModelYear}\t\t    {car.DailyPrice}\t\t{car.Description}");
                }
            }
            else
            {
                Console.WriteLine(result.Message);
            }
        }
        private static void EfCarTest()
        {
            CarManager carManager = new CarManager(new EfCarDal());

            carManager.Add(new Car {
                Id = 7, Description = "aanana", DailyPrice = -5
            });
            Console.WriteLine("\n");
            foreach (var car in carManager.GetAll())
            {
                Console.WriteLine(car.Description + "\nGünlük Kirası: " + car.DailyPrice);
            }
            Console.WriteLine("\nSiyah Renkli Arabalar\n");
            foreach (var car in carManager.GetAllByColorId(2))
            {
                Console.WriteLine(car.Description + "\nGünlük Kirası: " + car.DailyPrice);
            }
        }
Example #9
0
        private static void AllCarsByColorId(CarManager carManager, BrandManager brandManager, ColorManager colorManager, int id)
        {
            Console.WriteLine(".:: My Rent A Car ::. \n\t\t\t\t\tCar List Filter : ColorId[{0}]\n", id);
            Console.WriteLine("Car ID \tBrand \t\tColor \t\tModel \t\tPrice \t\tDesc");
            Console.WriteLine("------ \t------ \t\t------ \t\t------ \t\t------ \t\t------");

            foreach (var car in carManager.GetAllByColorId(id).Data)
            {
                Console.WriteLine("{0}\t{1}\t\t{2}\t\t{3}\t\t{4}\t\t{5}",
                                  car.Id,
                                  brandManager.GetById(car.BrandId).Data.BrandName,
                                  colorManager.GetById(car.ColorId).Data.ColorName,
                                  car.ModelYear,
                                  car.DailyPrice.ToString("##.## TL"),
                                  car.Descriptions);
            }
            Console.WriteLine("\n-----------------------End of List---------------------------------");
        }
Example #10
0
        private static void ColorIdTest(CarManager carManager, BrandManager brandManager, ColorManager colorManager)
        {
            var result = carManager.GetAllByColorId(2);

            if (result.Success)
            {
                Console.WriteLine("\n\nColor Id'si 2 olan arabalar: \nId\tColor Name\tBrand Name\tModel Year\tDaily Price\tDescription");

                foreach (var car in result.Data)
                {
                    Console.WriteLine($"{car.CarId}\t{colorManager.GetById(car.ColorId).Data.ColorName}\t\t{brandManager.GetById(car.BrandId).Data.BrandName}\t\t{car.ModelYear}\t\t{car.DailyPrice}\t\t{car.Description}");
                }
            }
            else
            {
                Console.WriteLine(result.Message);
            }
        }
Example #11
0
        private static void Rentalless()
        {
            CarManager carManager = new CarManager(new EfCarDal());

            Console.WriteLine("---------------Brand'a Göre geldi--------------------------------");
            foreach (var cars in carManager.GetAllByBrandId(2).Data)
            {
                Console.WriteLine(cars.Description);
            }
            Console.WriteLine("-------------------Color'a Göre Geldi----------------------------");
            foreach (var cars in carManager.GetAllByColorId(1).Data)
            {
                Console.WriteLine(cars.Description);
            }
            Console.WriteLine("-------------------Komple Geldi----------------------------");
            foreach (var cars in carManager.GetAll().Data)
            {
                Console.WriteLine(cars.Description);
            }

            Car car1 = new Car {
                Id = 5, BrandId = 1, ColorId = 2, DailyPrice = 150, ModelYear = 1987, Description = ""
            };

            carManager.Add(car1);
            Console.WriteLine("-------------------Eklenmediğinden Eskisi gibi geldi Çünkü Description en az 2 uzunluğunda olmalıydı----------------------------");
            foreach (var cars in carManager.GetAll().Data)
            {
                Console.WriteLine(cars.Description);
            }

            Console.WriteLine("-------------------Tablolar Birleşti / Hepsi geldi ----------------------------");
            if (carManager.GetAllDetails().Success == true)
            {
                foreach (var cars in carManager.GetAllDetails().Data)
                {
                    Console.WriteLine(cars.BrandName + " markasında " + cars.ColorName + " renginde " + cars.Description + " bir araba");
                }
            }
            else
            {
                Console.WriteLine(carManager.GetAllDetails().Message);
            };
        }
Example #12
0
        private static void CarTest()
        {
            CarManager carManager = new CarManager(new EfCarDal());

            foreach (var car in carManager.GetAllByBrandId(2).Data)
            {
                //Console.WriteLine(car.Name);
            }

            foreach (var car in carManager.GetAllByColorId(1).Data)
            {
                //Console.WriteLine(car.Name);
            }

            foreach (var car in carManager.GetCarDetails().Data)
            {
                Console.WriteLine("CarName = {0}  BrandName = {1} ColorName = {2}", car.CarName, car.BrandName, car.ColorName);
            }
        }
Example #13
0
        private static void CarTest(CarManager carManager)
        {
            var result = carManager.GetAll();

            Console.WriteLine("Tamamını listeleme");
            foreach (Car car in result.Data)
            {
                Console.WriteLine(car.Id + " " + car.Description);
            }

            var result1 = carManager.GetAllByBrandId(1);

            Console.WriteLine("Brand Id'ye göre listeleme");
            foreach (Car car in result1.Data)
            {
                Console.WriteLine(car.Id + " " + car.Description);
            }

            var result2 = carManager.GetAllByColorId(1);

            Console.WriteLine("Color Id'ye göre listeleme");
            foreach (Car car in result.Data)
            {
                Console.WriteLine(car.Id + " " + car.Description);
            }

            Car car1 = new Car()
            {
                BrandId = 3, ColorId = 2, DailyPrice = 450, Description = "2020 Model Kırmızı Renk Wolksvagen", ModelYear = 2020
            };

            carManager.Add(car1);
            Car car2 = new Car()
            {
                BrandId = 3, ColorId = 2, DailyPrice = 0, Description = "2020 Model Kırmızı Renk Wolksvagen", ModelYear = 2020
            };

            carManager.Add(car2);
        }
        private static void RefactoredMethod()
        {
            CarManager carManager = new CarManager(new InMemoryCarDal());

            ListAllCars(carManager);

            foreach (var color in carManager.GetAllByColorId(1))
            {
                Console.WriteLine("Cars by Color ID = 1");
                Console.WriteLine(color.BrandId);
            }

            carManager.Add(new Car {
                BrandId = 3, ColorId = 1
            });

            foreach (var carModel in carManager.GetAllByModelYear("2016"))
            {
                Console.WriteLine("Cars by Model Year 2016 = {0} {1}", carModel.BrandId, carModel.Description);
            }

            Car carToDelete = new Car
            {
                Id = 10, BrandId = 1, ColorId = 6, Description = "Available", DailyPrice = 256, ModelYear = "2001"
            };

            carManager.Delete(carToDelete);

            Car carToUpdate = new Car
            {
                Id = 6, BrandId = 2, ColorId = 3, DailyPrice = 350, Description = "Albea", ModelYear = "2002"
            };

            carManager.Update(carToUpdate);

            ListAllCars(carManager);
        }
Example #15
0
        private static void CarTest(CarManager carManager)
        {
            Console.WriteLine("*****************Mevcut arabalar****************");
            foreach (var car in carManager.GetAll().Data)
            {
                Console.WriteLine("Araba Id: {0}   Marka Id:{1}   Renk Id:{2}   Model Yılı: {3}  Fiyatı: {4} TL   Açıklama: {5}"
                                  , car.CarId, car.BrandId, car.ColorId, car.ModelYear, car.DailyPrice, car.Descriptions);
            }

            carManager.Add(new Car {
                BrandId = 2, ColorId = 3, ModelYear = 2003, DailyPrice = 60000, Descriptions = "Güzel."
            });
            Console.WriteLine("*****************Mevcut arabalar****************");
            foreach (var car in carManager.GetAll().Data)
            {
                Console.WriteLine("Araba Id: {0}   Marka Id:{1}   Renk Id:{2}   Model Yılı: {3}  Fiyatı: {4} TL   Açıklama: {5}"
                                  , car.CarId, car.BrandId, car.ColorId, car.ModelYear, car.DailyPrice, car.Descriptions);
            }

            carManager.Update(new Car {
                CarId = 5, BrandId = 3, ColorId = 3, ModelYear = 2007, DailyPrice = 60000, Descriptions = "Güzel."
            });
            Console.WriteLine("*****************Mevcut arabalar****************");
            foreach (var car in carManager.GetAll().Data)
            {
                Console.WriteLine("Araba Id: {0}   Marka Id:{1}   Renk Id:{2}   Model Yılı: {3}  Fiyatı: {4} TL   Açıklama: {5}"
                                  , car.CarId, car.BrandId, car.ColorId, car.ModelYear, car.DailyPrice, car.Descriptions);
            }

            carManager.Delete(new Car {
                CarId = 5, BrandId = 3, ColorId = 3, ModelYear = 2007, DailyPrice = 60000, Descriptions = "Güzel."
            });
            Console.WriteLine("*****************Mevcut arabalar****************");
            foreach (var car in carManager.GetAll().Data)
            {
                Console.WriteLine("Araba Id: {0}   Marka Id:{1}   Renk Id:{2}   Model Yılı: {3}  Fiyatı: {4} TL   Açıklama: {5}"
                                  , car.CarId, car.BrandId, car.ColorId, car.ModelYear, car.DailyPrice, car.Descriptions);
            }

            Console.WriteLine("\n-------------DailyPrice--------------");
            foreach (var car in carManager.GetByDailyPrice(50000, 130000).Data)
            {
                Console.WriteLine("Araba Id: {0}   Marka Id:{1}   Renk Id:{2}   Model Yılı: {3}  Fiyatı: {4} TL   Açıklama: {5}"
                                  , car.CarId, car.BrandId, car.ColorId, car.ModelYear, car.DailyPrice, car.Descriptions);
            }

            Console.WriteLine("\n-------------BrandId--------------");
            foreach (var car in carManager.GetAllByBrandId(1).Data)
            {
                Console.WriteLine("Araba Id: {0}   Marka Id:{1}   Renk Id:{2}   Model Yılı: {3}  Fiyatı: {4} TL   Açıklama: {5}"
                                  , car.CarId, car.BrandId, car.ColorId, car.ModelYear, car.DailyPrice, car.Descriptions);
            }

            Console.WriteLine("-------------ColorId--------------");
            foreach (var car in carManager.GetAllByColorId(4).Data)
            {
                Console.WriteLine("Araba Id: {0}   Marka Id:{1}   Renk Id:{2}   Model Yılı: {3}  Fiyatı: {4} TL   Açıklama: {5}"
                                  , car.CarId, car.BrandId, car.ColorId, car.ModelYear, car.DailyPrice, car.Descriptions);
            }

            Console.WriteLine("-------------CarDetail--------------");
            foreach (var car in carManager.GetCarDetail().Data)
            {
                Console.WriteLine("Araba Id: {0}   Marka Id:{1}   Renk Id:{2}   Model Yılı: {3}  Fiyatı: {4} TL   Açıklama: {5}"
                                  , car.CarId, car.BrandName, car.ColorName, car.ModelYear, car.DailyPrice, car.Descriptions);
            }
        }
Example #16
0
        private static void CarTest()
        {
            CarManager carManager = new CarManager(new EfCarDal());

            Console.WriteLine("**********Car*GetAll*********");

            var result = carManager.GetAll();

            if (result.Success == true)
            {
                foreach (var c in result.Data)
                {
                    Console.WriteLine(c.DailyPrice);
                }
                Console.WriteLine(result.Message);
            }
            else
            {
                Console.WriteLine(result.Message);
            }


            Console.WriteLine("**********Car*GetById*********");

            var result1 = carManager.GetById(2);

            Car car = result1.Data;

            Console.WriteLine(car.CarName + "/" + car.DailyPrice + "  " + result1.Message);


            Console.WriteLine("**********Car*GetCarDetails*********");

            var result2 = carManager.GetCarDetails();

            if (result2.Success == true)
            {
                foreach (var c in result2.Data)
                {
                    Console.WriteLine(c.CarName + "/" + c.BrandName + "/" + c.ColorName);
                }
                Console.WriteLine(result2.Message);
            }
            else
            {
                Console.WriteLine(result2.Message);
            }


            Console.WriteLine("**********Car*GetAllByColorId*********");

            var result3 = carManager.GetAllByColorId(2);

            foreach (var c in result3.Data)
            {
                Console.WriteLine(c.CarName);
            }
            Console.WriteLine(result3.Message);

            Console.WriteLine("**********Car*GetAllByBrandId*********");

            var result4 = carManager.GetAllByBrandId(3);

            foreach (var c in result4.Data)
            {
                Console.WriteLine(c.CarName);
            }
            Console.WriteLine(result4.Message);

            Console.WriteLine("**********Car*Add*********");

            var result5 = carManager.Add(new Car {
                Id = 6, BrandId = 2, ColorId = 1, CarName = "BMW 3 Serisi", ModelYear = 2018, DailyPrice = 100, Description = "BMV 3 Serisi Coupé"
            });

            Console.WriteLine(result5.Message);


            Console.WriteLine("**********Car*Delete*********");

            Car car1 = new Car {
                Id = 6
            };

            var result6 = carManager.Delete(car1);

            Console.WriteLine(result6.Message);


            Console.WriteLine("**********Car*Update*********");

            Car car2 = new Car {
                Id = 1, BrandId = 2, CarName = "Audi Q3", ColorId = 2, DailyPrice = 150, Description = "Audi Q3 1.5 TFSI Desing", ModelYear = 2015
            };

            var result7 = carManager.Update(car2);

            Console.WriteLine(result7.Message);
        }
Example #17
0
        static void Main(string[] args)
        {
            CarManager   carManager   = new CarManager(new EfCarDal());
            BrandManager brandManager = new BrandManager(new EfBrandDal());
            ColorManager colorManager = new ColorManager(new EfColorDal());

            bool cikis = true;

            while (cikis)
            {
                Console.WriteLine(
                    "Rent A Car \n---------------------------------------------------------------" +
                    "\n\n1.Araba Ekleme\n" +
                    "2.Araba Silme\n" +
                    "3.Araba Güncelleme\n" +
                    "4.Arabaların Listelenmesi\n" +
                    "5.Arabaların detaylı bir şekilde Listelenmesi\n" +
                    "6.Arabaların Marka Id'sine göre Listelenmesi\n" +
                    "7.Arabaların Renk Id'sine göre Listelenmesi\n" +
                    "8.Araba Id'sine göre Listeleme\n" +
                    "9.Arabaların fiyat aralığına göre Listelenmesi\n" +
                    "10.Arabaların model yılına göre Listelenmesi\n" +
                    "11.Çıkış\n" +
                    "Yukarıdakilerden hangi işlemi gerçekleştirmek istiyorsunuz ?"
                    );

                int number = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("\n---------------------------------------------------------------\n");
                switch (number)
                {
                case 1:
                    Console.WriteLine("Color Listesi");
                    GetAllColor(colorManager);

                    Console.WriteLine("Brand Listesi");
                    GetAllBrand(brandManager);

                    Console.WriteLine("\nBrand Id: ");
                    int brandIdForAdd = Convert.ToInt32(Console.ReadLine());

                    Console.WriteLine("Color Id: ");
                    int colorIdForAdd = Convert.ToInt32(Console.ReadLine());

                    Console.WriteLine("Daily Price: ");
                    decimal dailyPriceForAdd = Convert.ToDecimal(Console.ReadLine());

                    Console.WriteLine("Description : ");
                    string descriptionForAdd = Console.ReadLine();

                    Console.WriteLine("Model Year: ");
                    string modelYearForAdd = Console.ReadLine();

                    Car carForAdd = new Car {
                        BrandId = brandIdForAdd, ColorId = colorIdForAdd, DailyPrice = dailyPriceForAdd, Description = descriptionForAdd, ModelYear = modelYearForAdd
                    };
                    carManager.Add(carForAdd);
                    break;

                case 2:
                    GetAllCarDetails(carManager);
                    Console.WriteLine("Hangi Id'ye sahip arabayı silmek istiyorsunuz? ");
                    int carIdForDelete = Convert.ToInt32(Console.ReadLine());
                    carManager.Delete(carManager.GetById(carIdForDelete));
                    break;


                case 3:
                    GetAllCarDetails(carManager);
                    Console.WriteLine("Car Id: ");
                    int carIdForUpdate = Convert.ToInt32(Console.ReadLine());

                    Console.WriteLine("Brand Id: ");
                    int brandIdForUpdate = Convert.ToInt32(Console.ReadLine());

                    Console.WriteLine("Color Id: ");
                    int colorIdForUpdate = Convert.ToInt32(Console.ReadLine());

                    Console.WriteLine("Daily Price: ");
                    decimal dailyPriceForUpdate = Convert.ToDecimal(Console.ReadLine());

                    Console.WriteLine("Description : ");
                    string descriptionForUpdate = Console.ReadLine();

                    Console.WriteLine("Model Year: ");
                    string modelYearForUpdate = Console.ReadLine();

                    Car carForUpdate = new Car {
                        CarId = carIdForUpdate, BrandId = brandIdForUpdate, ColorId = colorIdForUpdate, DailyPrice = dailyPriceForUpdate, Description = descriptionForUpdate, ModelYear = modelYearForUpdate
                    };
                    carManager.Update(carForUpdate);
                    break;

                case 4:
                    Console.WriteLine("Arabaların Listesi:  \nId\tColor Name\tBrand Name\tModel Year\tDaily Price\tDescriptions");
                    GetAllCar(carManager);
                    break;

                case 5:
                    Console.WriteLine("Arabaların detaylı listesi:  \nId\tColor Name\tBrand Name\tModel Year\tDaily Price\tDescriptions");
                    GetAllCarDetails(carManager);
                    break;

                case 6:
                    GetAllBrand(brandManager);
                    Console.WriteLine("Hangi markaya sahip arabayı görmek istiyorsunuz? Lütfen bir Id numarası yazınız.");
                    int brandIdForCarList = Convert.ToInt32(Console.ReadLine());
                    Console.WriteLine($"\n\nBrand Id'si {brandIdForCarList} olan arabalar: \nId\tColor Name\tBrand Name\tModel Year\tDaily Price\tDescriptions");
                    foreach (var car in carManager.GetAllByBrandId(brandIdForCarList))
                    {
                        Console.WriteLine($"{car.CarId}\t{colorManager.GetById(car.ColorId).ColorName}\t\t{brandManager.GetById(car.BrandId).BrandName}\t\t{car.ModelYear}\t\t{car.DailyPrice}\t\t{car.Description}");
                    }
                    break;

                case 7:
                    GetAllColor(colorManager);
                    Console.WriteLine("Hangi renge sahip arabayı görmek istiyorsunuz? Lütfen bir Id numarası yazınız.");
                    int colorIdForCarList = Convert.ToInt32(Console.ReadLine());
                    Console.WriteLine($"\n\nColor Id'si {colorIdForCarList} olan arabalar: \nId\tColor Name\tBrand Name\tModel Year\tDaily Price\tDescriptions");
                    foreach (var car in carManager.GetAllByColorId(colorIdForCarList))
                    {
                        Console.WriteLine($"{car.CarId}\t{colorManager.GetById(car.ColorId).ColorName}\t\t{brandManager.GetById(car.BrandId).BrandName}\t\t{car.ModelYear}\t\t{car.DailyPrice}\t\t{car.Description}");
                    }
                    break;

                case 8:
                    GetAllCarDetails(carManager);
                    Console.WriteLine("Hangi arabayı görmek istiyorsunuz? Lütfen bir Id numarası yazınız.");
                    int carId = Convert.ToInt32(Console.ReadLine());
                    Console.WriteLine($"\n\nId'si {carId} olan araba: \nId\tColor Name\tBrand Name\tModel Year\tDaily Price\tDescriptions");
                    Car carById = carManager.GetById(carId);
                    Console.WriteLine($"{carById.CarId}\t{colorManager.GetById(carById.ColorId).ColorName}\t\t{brandManager.GetById(carById.BrandId).BrandName}\t\t{carById.ModelYear}\t\t{carById.DailyPrice}\t\t{carById.Description}");
                    break;

                case 9:
                    decimal min = Convert.ToDecimal(Console.ReadLine());
                    decimal max = Convert.ToDecimal(Console.ReadLine());

                    Console.WriteLine($"\n\nGünlük fiyat aralığı {min} ile {max} olan arabalar: \nId\tColor Name\tBrand Name\tModel Year\tDaily Price\tDescriptions");
                    foreach (var car in carManager.GetByDailyPrice(min, max))
                    {
                        Console.WriteLine($"{car.CarId}\t{colorManager.GetById(car.ColorId).ColorName}\t\t{brandManager.GetById(car.BrandId).BrandName}\t\t{car.ModelYear}\t\t{car.DailyPrice}\t\t{car.Description}");
                    }
                    break;

                case 10:
                    GetAllCarDetails(carManager);
                    Console.WriteLine("Hangi model yılına sahip arabayı görmek istiyorsunuz? Lütfen yıl değeri giriniz.");
                    string modelYearForCarList = Console.ReadLine();
                    Console.WriteLine($"\n\nColor Id'si {modelYearForCarList} olan arabalar: \nId\tColor Name\tBrand Name\tModel Year\tDaily Price\tDescriptions");
                    foreach (var car in carManager.GetByModelYear(modelYearForCarList))
                    {
                        Console.WriteLine($"{car.CarId}\t{colorManager.GetById(car.ColorId).ColorName}\t\t{brandManager.GetById(car.BrandId).BrandName}\t\t{car.ModelYear}\t\t{car.DailyPrice}\t\t{car.Description}");
                    }
                    break;

                case 11:
                    cikis = false;
                    Console.WriteLine("Çıkış işlemi gerçekleşti.");
                    break;
                }
            }
        }