public async Task <ICommandResult> HandleAsync(MarkTodoItemAsUnComplete command) { var todoItem = await this._sessionRepository.GetAsync <TodoItem>(command.Id, command.Version); todoItem.MarkTodoItemAsUnComplete(); await this._sessionRepository.CommitAsync(); return(new CommandResult(HttpStatusCode.OK, new { AggregateId = todoItem.Id, AggregateVersion = todoItem.Version })); }
public async Task <ICommandResult> MarkTodoItemAsUnComplete(MarkTodoItemAsUnComplete markTodoItemAsUnComplete) { return(await _bus.SubmitAsync(markTodoItemAsUnComplete)); }