Beispiel #1
0
        public void ekle()
        {
            KodDBContext entity = new KodDBContext();

            Product product1 = new Product()
            {
                Name = "kalem", DisplayOrder = "yes"
            };
            Product product2 = new Product()
            {
                Name = "silgi", DisplayOrder = "yes"
            };
            Product product3 = new Product()
            {
                Name = "defter", DisplayOrder = "yes"
            };
            Product product4 = new Product()
            {
                Name = "çanta", DisplayOrder = "yes"
            };

            entity.Products.Add(product1);
            entity.Products.Add(product2);
            entity.Products.Add(product3);
            entity.Products.Add(product4);
            entity.SaveChanges();
        }
Beispiel #2
0
        public void ekle()
        {
            KodDBContext entity = new KodDBContext();

            Product product1 = new Product() { Name = "kalem",  DisplayOrder = "yes" };
            Product product2 = new Product() { Name = "silgi",  DisplayOrder = "yes"  };
            Product product3 = new Product() { Name = "defter", DisplayOrder = "yes" };
            Product product4 = new Product() { Name = "çanta",  DisplayOrder = "yes" };

            entity.Products.Add(product1);
            entity.Products.Add(product2);
            entity.Products.Add(product3);
            entity.Products.Add(product4);
            entity.SaveChanges();
        }