public async Task Apply(ListItemAdded evnt) { await _store.FindOneAndUpdateAsync( evnt.ListId, x => x.Items.Add(evnt.ItemId, new TodoListItem { Id = evnt.ItemId, Description = evnt.Description, Status = TodoItemStatus.Added }) ); }
public void On(ListItemAdded evnt) { ItemsIds.Add(evnt.ItemId); }