Пример #1
0
 public OrderItem Add( OrderItem orderItem )
 {
     using ( var context = _createContext() )
     {
         context.OrderItems.Add( orderItem );
         context.SaveChanges();
         return orderItem;
     }
 }
Пример #2
0
        public OrderItem RecordOrderItem( License license, PurchaseRecord purchaseRecord, int itemNumber )
        {
            OrderItem item = new OrderItem()
            {
                OrderItemNo = itemNumber,
                PurchaseRecordId = purchaseRecord.Id,
                ActivationKey = license.ActivationKey,
                LicenseId = license.LicenseId
            };

            _orderItemRepository.Add( item );
            return item;
        }