Пример #1
0
        private static void ProductTest()
        {
            IProductService productService = new ProductManager(new EfProductDal());
            List <Product>  addList        = new List <Product>
            {
                new Product
                {
                    ProductName = "Bilgisayar",
                    UnitPrice   = 1855.65m
                },

                new Product
                {
                    ProductName = "Motorsiklet",
                    UnitPrice   = 20000
                },

                new Product
                {
                    ProductName = "Telefon",
                    UnitPrice   = 2055.75m
                },

                new Product
                {
                    ProductName = "Kulaklık",
                    UnitPrice   = 185
                }
            };

            productService.MultipleInsertion(addList);
            Console.WriteLine("Ürünleri Listele");
            foreach (var product in productService.GetAll().Data)
            {
                Console.WriteLine("ID : {0}, Ürün : {1}, Fiyat : {2} TL", product.Id, product.ProductName, product.UnitPrice);
            }
        }