I have a long sql in which there are multiple where conditions. I want one where condition to only be considered if the value passed is not null
Linq
from b in _context.customer
join d in _context.Address on b.id equals d.Id
join e in _context.units on d.Id equals e.Id
where e.unitNumber == valueProvided)
select new modelAddress
{
address= address
}
value provided can be null so I want the where condition to not take e.unitNumber into account. Also this is just an example, actual query is really large