0
I have a repository that represents my table in the database
var RelacaoPessoas = _repositoryPessoas.GetFiltered(i => i.IdProcesso == idprocesso && i.Banco == numeroDoBanco && i.CpfCnpj.Contains(cpfCnpj)).ToList();
I need to rescue the records from a list of Cpf’s, in sql would be something like this:
select * from Pessoas where IdProcesso = @idprocesso and Banco = @numeroBanco and CpfCnpj in (<lista de cpfs aqui>)
However, I don’t know what the equivalent function of "in" would be. I know that "Contains" accepts string, I tried to pass this list as a comma-separated string like this: "cpf1,cpf2,cpf3..." but it didn’t work.
Can someone help me?
syntax apparently is ok, Contaisn is the equivalent of in, but some data from your query must be returning false already checked if idprocess and numeroDoBanco have expected values in the database ?
– Marcos Brinner
Marcos, Contains would be equivalent to the "like" of sql, so as I was going to stop "cpf1,cpf2,cpf3...", in sql it would be the same as "select * from table Where Cpf like 'cpf1,cpf2,cpf3...' ". For this reason I was not returning anything
– Brito