// ========================================================================================
        // PRIVATE METHODS
        // ========================================================================================

       
        private Purchase CreatePurchase(Product product)
        {
            Purchase purchase = new Purchase(product);
            db.Purchases.Add(purchase);
            db.SaveChanges();
            return purchase;
        }
Ejemplo n.º 2
0
        public Purchase(Product product)
        {            
            Product = product;
            Status = "prepared";             

        }