コード例 #1
0
        // ========================================================================================
        // PRIVATE METHODS
        // ========================================================================================

       
        private Purchase CreatePurchase(Product product)
        {
            Purchase purchase = new Purchase(product);
            db.Purchases.Add(purchase);
            db.SaveChanges();
            return purchase;
        }
コード例 #2
0
        public Purchase(Product product)
        {            
            Product = product;
            Status = "prepared";             

        }