public CreateInventoryItem(InventoryItemDto inventoryItem) { AggregateId = inventoryItem.Id; Timestamp = inventoryItem.LastEventTimestamp; EventName = "CreateInventoryItem"; EventData = new CreateInventoryItemData(inventoryItem); }
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; }