public GenericCommandResult Delete( //[FromBody] Sessao sessao, [FromBody] ExcluirPessoaExternaCommand command, [FromServices] PessoaExternaHandler handler) { //command.sessao = User.Claims.FirstOrDefault(X500DistinguishedName => X500DistinguishedName.Type == "user_id")?.Value; return((GenericCommandResult)handler.Handle(command)); }
public UsuarioPessoaExternaMutation(InserirPessoaExternaCommand inserirCommand, AlterarPessoaExternaCommand alterarCommand, ExcluirPessoaExternaCommand excluirCommand, PessoaExternaHandler handler) { _inserirCommand = inserirCommand; _alterarCommand = alterarCommand; _excluirCommand = excluirCommand; _handler = handler; }