Hi all
foreach (var incident in new DataAccess.IncidentRepository().GetItems().Where(
i => (startDate == null || i.IncidentDate >= startDate)
&& (endDate == null || i.IncidentDate <= endDate)
&& (shiftId == null || i.ShiftId == shiftId)
&& (processAreaId == null || i.ProcessAreaId == processAreaId)
&& (plantId == null || i.PlantId == plantId)))
is there a way I can i.PlantId == plantId
not to get added if plantId
is null
?
Thanks