Ejemplo n.º 1
0
 public CreateInventoryItem(InventoryItemDto inventoryItem)
 {
     AggregateId = inventoryItem.Id;
     Timestamp   = inventoryItem.LastEventTimestamp;
     EventName   = "CreateInventoryItem";
     EventData   = new CreateInventoryItemData(inventoryItem);
 }
Ejemplo n.º 2
0
        public override void ApplyEventData(IModelAggregate <Guid> model)
        {
            CreateInventoryItemData eventData = ((CreateInventoryItemData)EventData);

            ((InventoryItemAggregate)model).AggregateId        = AggregateId;
            ((InventoryItemAggregate)model).EventModelRow      = 1;
            ((InventoryItemAggregate)model).LastEventTimestamp = Timestamp;
            ((InventoryItemAggregate)model).Name     = eventData.InventoryItemData.Name;
            ((InventoryItemAggregate)model).Count    = eventData.InventoryItemData.Count;
            ((InventoryItemAggregate)model).IsActive = eventData.InventoryItemData.IsActive;
            ((InventoryItemAggregate)model).Note     = eventData.InventoryItemData.Note;
        }