linq where in c# 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 query select where c#
var queryLondonCustomers = from cust in customers
where cust.City == "London"
select cust;