where in linq code example
Example 1: linq c# where condition
var query = MemberTable.Where(x=>x.sex.Equals(Sex))
if (members != null)
query = query.Where(x=>members.Contains(x.membercode))
//use your query
query.ToList();
Example 2: linq c# or
filteredTasks = filteredTasks.Where(p => p.TaskStateID == 10 ||
p.TaskStateID == 11 ||
p.TaskStateID == 12);