Esempio n. 1
0
        public bool AddProducts(Product product)
        {
            nORTHWNDEntities.Set <Product>().Add(product);
            int isAdded = nORTHWNDEntities.SaveChanges();

            if (isAdded > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
        public bool AddOrderDetails(Order_Detail order_Detail)
        {
            nORTHWNDEntities.Set <Order_Detail>().Add(order_Detail);
            var isAdded = nORTHWNDEntities.SaveChanges();

            if (isAdded > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
0
        public bool AddCategories(Category category)
        {
            nORTHWNDEntities.Set <Category>().Add(category);

            var isAdded = nORTHWNDEntities.SaveChanges();

            if (isAdded > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 4
0
        public bool AddOrders(Order order)
        {
            nORTHWNDEntities.Set <Order>().Add(order);
            int isAdded = nORTHWNDEntities.SaveChanges();

            if (isAdded > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }