I have a linq statement that I want to add an additional where clause to if a drop down index is not 0.
people.Where(n.surname == "surname" || n.forename == "forename" && (dropdown.SelectedIndex > 0) ? n.id = dropdown.SelectedValue : n.id > 0).Select(n => n);
I am not even sure if what I am trying is possible??
I would like to do this rather than having to write two different statements.
Any ideas?
Thanks