score:3
Accepted answer
Try this:
q => q.Where(e => e.Addresses.Any(<your condition goes here>))
for example
q => q.Where(e => e.Addresses.Any(a => a.City == "Moscow"))
Source: stackoverflow.com
Related Articles
- how to write a Linq query with a EF code first Many to Many relationship
- LINQ Intersect Query for Many to Many relationship using .NET4 MVC4 Code First
- Query a many to many relationship with Entity Framework and .NET 3.5
- query and create objects with a one to many relationship using LINQ
- NHibernate LINQ query performance, which code fragment is better?
- How do I query many-to-many relationship in NHibernate
- How to join multiple 1 to many relationship tables using NHibernate
- Querying Mongo when a document have one to many relationship in a single well structed query using mongo C# driver
- NHibernate - LINQ Query Many to Many Issue
- Linq Query to Search "Many" in one to many relationship
- linq query with many to many relationship
- How to Filter a Query On a One to Many Relationship via Linq
- Simple linq query using group in order to return a one to many relationship
- Trying to order by value that has a one to many relationship - LINQ query
- Query from a many to many relationship table
- Linq Query relating Many to Many relationship
- Linq query on many to many relationship
- EF code first make one to many relationship
- how to fetch data from database using linq query for relationship 1:N and N:N (between 3 entity) in asp.net mvc EF code first?
- Query a many to may relationship with Linq
- How to join columns or properties of entities that belongs as many relationship to another entity in .NET EF Code First
- Proper Linq Query for objects with many to many relation ship generated with code first entity framework
- EF Code First selecting rows based on many to many relationship
- How to write one to many relationship query in C# linq
- query many to many relationship with Linq
- How to use Future query Nhibernate in case of many to many association
- using a look up table to query a many to many relationship and return all that meet the criteria
- Entity-framework code is slow when using Include() many times
- Query a many-to-many relationship with linq/Entity Framework. CodeFirst
- Could not find an implementation of the query pattern for source type 'System.Data.Entity.DbSet'
- Distinct with encapsulated equality
- LINQ with SQLite (linqtosql)
- LINQ to DataSet, DataTable.AsEnumerable() not recognized
- Any way I can run custom LINQ during debug / breakpoint in VS2010 or otherwise?
- How to convert DateTimeOffset to DateTime in Linq
- Specific elements from XML string to a datagridview or datatable (C#)
- How do I get the max ID with Linq to Entity?
- Linq query with multiple joins
- Place IDs in IEnumerable<int> within single LINQ query
- GroupBy using a list of strings
- Linq: Nested queries are better than joins, but what if you use 2 nested queries?
- How to apply if condition in LINQ?
- Emulate yield return for IObservable
- Having problems with inner joins in LINQ
- SQL query converting to LINQ
- linq query Take() takes precedence over Distinct()?
- The type arguments for method 'System.Linq.Queryable.SelectMany System.Linq.IQueryable
- Parse html table using HtmlAgilityPack (Linq)
- linq and string array
- How to query an XDocument with LINQ when elements have a colon in their name?