This expression should do what you want to achieve.
dataSource.StateList.Where(s => countryCodes.Contains(s.CountryCode))
More Related Contents:
- Lambda statement for finding sub-string in a string from list of strings [closed]
- Fluent and Query Expression — Is there any benefit(s) of one over other?
- Reading a file line by line in C#
- ToList()– does it create a new list?
- XElement namespaces (How to?)
- LINQ Aggregate algorithm explained
- How to use a string to create a EF order by expression?
- Mutating the expression tree of a predicate to target another type
- Why does Enumerable.All return true for an empty sequence? [duplicate]
- Combination Generator in Linq
- How can I get the index of an item in a list in a single step?
- Distinct in Linq based on only one field of the table
- Performance of LINQ Any vs FirstOrDefault != null
- LINQ to find series of consecutive numbers
- Convert anonymous type to class
- Linq query with nullable sum
- Dynamic table name in linq [duplicate]
- C# Select elements in list as List of string
- Join and Include in Entity Framework
- LINQ to SQL using GROUP BY and COUNT(DISTINCT)
- Creating dynamic queries with entity framework
- The data source does not support server-side data paging
- Last and LastOrDefault not supported
- How to group by DateTime.Date in EntityFramework
- How to set property value using Expressions? [duplicate]
- Should the order of LINQ query clauses affect Entity Framework performance?
- Transform IEnumerable asynchronously by awaiting each task
- Map two lists into a dictionary in C#
- How to check if all list items have the same value and return it, or return an “otherValue” if they don’t?
- Can I use Linq’s Except() with a lambda expression comparer?