1
I make an appointment at the bank.
I would like to filter the column ID_LEAD by the filter value "if there is" int?(filter.code) or filter all over the world.
follows the example of how this in the bank to process
WHERE ---- @ID_LEAD ----
LE.ID_LEAD = ISNULL(@ID_LEAD,ID_LEAD)
I would like to do this in my consultation
var lead = (from l in this.DB.BGC_LEAD
where l.ID_LEAD == ).ToList();
You want to validate if the
codigo
isnull
or if he is zero? (To bring all the records).– Jéf Bueno
Good question! I got that question too.
– Ismael
I want to know if the filter.code and null, if it is null it will not be a filter, otherwise I want to filter by its value;
– Junior Torres
@Juniortorres That’s exactly what I did at my answer
– Jéf Bueno
@jbueno it returns all results passing null even the other records not being null in column ID_LEAD ?
– Junior Torres
Of course, that’s what the expression says.
– Jéf Bueno