Check out example codes for "linq c# where condition". It will help you in understanding the concepts better.

Code Example 1

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();

Learn ReactJs, React Native from akashmittal.com