public ListaEntity GetByCodigo([FromServices] IListaRepository repository, string codigo) { //var user = repository.GetByIdFacebook(idFacebook); var result = repository.GetByCodigo(codigo); return(result); }
public ICommandResult Handler(GetListByCodigoCommand command) { command.Validate(); if (command.Invalid) { return(new GenericCommandResult(false, "alguma coisa deu errado", command.Notifications)); } var lista = _listaRepository.GetByCodigo(command.Codigo); return(new GenericCommandResult(true, "Sucesso", lista)); }