public async Task <Unit> Handle(UpdateToDoList request, CancellationToken cancellationToken) { var toDoList = await _aggregateRepository.LoadAsync(request.ToDoListId); var @event = new ToDoListUpdatedV1(toDoList.Id, request.Label, request.Description); toDoList.When(@event); await _aggregateRepository.SaveAsync(toDoList); return(Unit.Value); }
public Task Handle(ToDoListUpdatedV1 notification, CancellationToken cancellationToken) { When(notification); return(Task.CompletedTask); }