Example #1
0
        private static void ColorsTest()
        {
            ColorsManager colorsManager = new ColorsManager(new EfColorDal());

            colorsManager.Add(new Colors {
                Name = "Red"
            });
            colorsManager.Update(new Colors {
                Id = 2, Name = "Black"
            });
            colorsManager.Delete(new Colors {
                Id = 3, Name = "Blue"
            });

            Console.WriteLine("Renk Seçeneklerimiz:");
            foreach (var color in colorsManager.GetAll().Data)
            {
                Console.WriteLine(color.Name);
            }
        }
        private static void ColorTest()
        {
            ColorsManager colorsManager = new ColorsManager(new EfColorsDal());

            colorsManager.Delete(new Colors {
                ColorsId = 1
            });
            colorsManager.Add(new Colors {
                ColorsId = 1, ColorsName = "Eflatun"
            });
            colorsManager.Update(new Colors {
                ColorsId = 2, ColorsName = "Mor"
            });

            foreach (var colors in colorsManager.GetAll().Data)
            {
                Console.WriteLine(colors.ColorsName);
            }

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