Beispiel #1
0
        public bool AddPurchase(Purchase purchase)
        {
            int isExecuted = 0;

            db.Purchases.Add(purchase);
            isExecuted = db.SaveChanges();
            return(isExecuted > 0);
        }
        public bool AddProduct(Product product)
        {
            int isExecuted = 0;

            db.Products.Add(product);
            isExecuted = db.SaveChanges();
            return(isExecuted > 0);
        }
Beispiel #3
0
        public bool Add(Customer customer)
        {
            int isExecuted = 0;

            db.Customers.Add(customer);
            isExecuted = db.SaveChanges();
            return(isExecuted > 0);
        }
        public bool AddCategory(Category category)
        {
            int isExecuted = 0;

            db.Categories.Add(category);
            isExecuted = db.SaveChanges();
            return(isExecuted > 0);
        }