linq where condition c#

62

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

linq where condition c# -

var query = mainQuery.Where(a => a.TableId.Id == 5);

Comments

Submit
0 Comments