Assuming you have association properties...
var q = from co in Counties where co.Cities.Any(city =>city.Population > p) select co;
var q = Counties.Where(co => co.Cities.Any(city => city.Population > p));
- How do you code a cross join in LINQ?
- How do you perform a left outer join using linq extension methods
- How do you perform a CROSS JOIN with LINQ to SQL?
- How do you left join in Linq if there is more than one field in the join?
- linq - how do you do a query for items in one query source that are not in another one?
- How can I code an outer join using LINQ and EF6?
- How do you left join using "date between" operator in linq?
- How do you do a join in LinqToSQL?
- How would you write this C# code (that uses the yield keyword) succinctly in Ruby?
- how do you split up or join a linq query on an "or" (without using Union)?
- How to join one row to every row in source table using LINQ
- How to join two arrays in C# using a single line of code
- How do you write an INNER JOIN with an "OR" in Linq
- How do you selectively join in tables with linq?
- How to join columns or properties of entities that belongs as many relationship to another entity in .NET EF Code First
- How to Insert data in Join table which were created by using EF Code First
- How do you Left join 'Is Not Null' using linq?
- How do you perform a left outer join with a where clause using linq lambda extension methods
- How do you do a join on two tables when you are implementing uows & a generic repository
- How would you do a "not in" query with LINQ?
- How to do joins in LINQ on multiple fields in single join
- How to perform Join between multiple tables in LINQ lambda
- How do I find the text within a div in the source of a web page using C#
- What are Expression Trees, how do you use them, and why would you use them?
- How do you add an index field to Linq results
- How are people unit testing code that uses Linq to SQL
- How can you handle an IN sub-query with LINQ to SQL?
- What does this C# code with an "arrow" mean and how is it called?
- How do you construct a LINQ to Entities query to load child objects directly, instead of calling a Reference property or Load()
- How to resolve Value cannot be null. Parameter name: source in linq?
More Query from same tag
- Linq one to many (parent and child entities) using criteria on child entity
- Convert SQL to Linq select in where
- How to programmatically determine tab index of fields on a form based on their X,Y coordinates?
- Linq query to create 3 objects from one table. Is it possible?
- SingleOrDefault linq method throwing exception
- How to join deep data in the Entity Framework?
- Linq extension methods - how to obtain parent object?
- Expression.Body.Expressions -- how to use it?
- Entity Framework Linq Group by DateRange
- Any Intersection in Two Collections
- Using custom sql server function in linq?
- How can i recursively call, query filter and change an api call using linq?
- Can you use LINQ or lambdas to perform matrix operations?
- Correct syntax for creating an array from a foreach loop
- Alternative to For Each loop when setting properties
- Why does a variable value have to be modelled as a member access to the closure in an expression tree?
- Check if queryable is null before assigning a list
- LINQ Group by with two statements
- Remove elements in List<T> that are in Tuple<T1,T2>
- ASP.NET MVC LINQ Entity Framework recursive
- Use listbox SelectedItems as LINQ argument
- How to convert datatable to corresponding "named" and "typed" IEnumerable for Intellisense
- Entity Framework/LINQ: Selecting columns from multiple tables?
- C# Linq - Create a dynamic select query based on user input
- Linq remove where if the value is null
- How to return List instead of an object using Lambda and EF
- RavenDB, Linq: Build an expression from a Property inside a nested hierarchy
- linq to sql startwith performance indexed columns
- Unable to parse xml string using Xdocument and Linq
- LINQ to get the Descendant of type "a" from HTMLNodesCollection