public GenericCommandResult Update( [FromBody] UpdateCommandKnowledgeWall command, [FromServices] KnowledgeWallHandler handler ) { return((GenericCommandResult)handler.Handle(command)); }
public ICommandResult Handle(UpdateCommandKnowledgeWall command) { var knowledgeWallDB = _repository.GetById(command.Id); // Salva no banco _repository.Update(knowledgeWallDB); // Retorna o resultado return(new GenericCommandResult(true, "Tarefa salva", knowledgeWallDB)); }