protected async Task ProduceCommandAsync <TCommand>(TCommand command, string sender) where TCommand : class, ICommand { Argument.IsNotNull(command, nameof(command)); Argument.StringNotEmpty(sender, nameof(sender)); await _domainBus.CommandAsync(command, sender); }
public async Task <CreateTodoListResponse> Any(CreateTodoListRequest request) { string todoListId = _idGenerator.Generate(); await _domainBus.CommandAsync(new CreateTodoList { ListId = todoListId, Title = request.Title }, ""); return(new CreateTodoListResponse { Id = todoListId }); }