0
Hello, my entity To has a long type attribute that can be NULL making relationship with the entity B, by making a filter with a Lambda expression with this attribute to bring all records that are different from NULL he doesn’t recognize my condition WHERE and ends up returning all the objects of the entity. Follow the consultation.
return Context.MatriculaInscricaoAluno.Where(p => p.TituloID != null ).Count();
in syntax SQL Server works as follows.
select * from Siscona.MatriculaInscricaoAluno where TituloID is NULL
thank you all.
the guy should be
long?
right ? Try to:Where(p => p.TituloID.HasValue)
– Rovann Linhalis
I think in SQL, it would be
is not null
– Rovann Linhalis
Against, unfortunately nothing.
– Thiago Ubiratan
Put your as is, a minimum checkable example please
– Rovann Linhalis