I have this below code where i filter out type which are not of “type1”.
List = Details.Where(p => p.Type != Constants.Type1).ToList();
Now i have to create the where query dynamically in which i can have more clauses for filtering data.
so a modified version of above code is
List = Details.Where(p => p.Type != Constants.Type1 && p.Type != Constants.Type2 ).ToList();
Please advice how i can achieve this in c#
1 Answer