示例#1
0
        private static void CollorsAdd()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());
            List <Color> colors       = new List <Color> {
                new Color {
                    Id = 1, ColorName = "Red"
                },
                new Color {
                    Id = 2, ColorName = "White"
                },
                new Color {
                    Id = 3, ColorName = "Blue"
                },
                new Color {
                    Id = 4, ColorName = "Yellow"
                },
                new Color {
                    Id = 5, ColorName = "Green"
                }
            };

            foreach (var item in colors)
            {
                colorManager.AddColor(item);
            }
            Console.WriteLine("işlem tamam");
        }
示例#2
0
        private static void AddColorTest()
        {
            ColorManager colorManager = new ColorManager(new EfColorDal());

            colorManager.AddColor(new Color {
                ColorName = "Füme"
            });
        }
示例#3
0
        private static Color AddColor(ColorManager colorManager)
        {
            Color color1 = new Color
            {
                AddedDate = DateTime.Now,
                Name      = "Gri"
            };

            colorManager.AddColor(color1);
            return(color1);
        }
示例#4
0
        private static void renkEkle(ColorManager colorManager)
        {
            Color color1 = new Color
            {
                ColorID   = 1,
                ColorName = "Kırmızı"
            };

            colorManager.AddColor(color1);
            Console.WriteLine("Renk eklendi , Eklenen renk  : {0}", color1.ColorName);
        }
示例#5
0
        private static void RenkSilmeTesti()
        {
            NColor color = new NColor();

            color.ColorName = "SİLİNECEK OLAN RENK";
            ColorManager colorManager = new ColorManager(new EfColorDAL());

            colorManager.AddColor(color);
            ColorTest();
            Console.WriteLine("----SİLME İŞLEMİ DEVREYE SOKULUYOR---");
            colorManager.DeleteColor(color);
            ColorTest();
        }
示例#6
0
        private static void AddColor(NColor color)
        {
            ColorManager colorManager = new ColorManager(new EfColorDAL());

            colorManager.AddColor(color);
        }