private static void brandManagerTest(BrandManager brandManager) { Brand brand1 = new Brand { BrandId = 8, BrandName = "Lamborgini" }; Brand brand2 = new Brand { BrandId = 9, BrandName = "Audi" }; brandManager.Add(brand1); brandManager.Add(brand2); var getBrand = brandManager.GetBrand(1); brandManager.Delete(brand2); }
private static void BrandTest(BrandManager brandManager) { Console.WriteLine("*****************Mevcut Markalar****************"); foreach (var brand in brandManager.GetAll().Data) { Console.WriteLine("Marka Id:{0} Marka Adı:{1}", brand.BrandId, brand.BrandName); } Console.WriteLine("\n*****************Mevcut Markalar****************"); brandManager.Add(new Brand { BrandName = "Land-Rover" }); foreach (var brand in brandManager.GetAll().Data) { Console.WriteLine("Marka Id:{0} Marka Adı:{1}", brand.BrandId, brand.BrandName); } Console.WriteLine("\n*****************Mevcut Markalar****************"); brandManager.Update(new Brand { BrandId = 4, BrandName = "Cadillac" }); foreach (var brand in brandManager.GetAll().Data) { Console.WriteLine("Marka Id:{0} Marka Adı:{1}", brand.BrandId, brand.BrandName); } Console.WriteLine("\n*****************Mevcut Markalar****************"); brandManager.Delete(new Brand { BrandId = 4, BrandName = "Cadillac" }); foreach (var brand in brandManager.GetAll().Data) { Console.WriteLine("Marka Id:{0} Marka Adı:{1}", brand.BrandId, brand.BrandName); } Console.WriteLine("\n*****************GetBrand****************"); Console.WriteLine(brandManager.GetBrand(2).Data.BrandName); }