コード例 #1
0
        public static PurchaseTransaction Create(PurchaseTransactionId id)
        {
            var purchaseTransaction = new PurchaseTransaction();

            purchaseTransaction.Apply(new Events.PurchaseTransactionCreated
            {
                Id = id
            });

            return(purchaseTransaction);
        }
コード例 #2
0
        public static PurchaseTransaction CreateFull(PurchaseTransactionId id, Store store, ICollection <LineItemStripped> lineItems)
        {
            var purchaseTransaction = new PurchaseTransaction();

            purchaseTransaction.Apply(new Events.PurchaseTransactionFullCreated
            {
                Id        = id,
                Store     = store,
                LineItems = lineItems
            });

            return(purchaseTransaction);
        }