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 Query
- how to write a Linq query with a EF code first Many to Many relationship
- How do I query many-to-many relationship in NHibernate
- How to join multiple 1 to many relationship tables using NHibernate
- How to Filter a Query On a One to Many Relationship via Linq
- LINQ Intersect Query for Many to Many relationship using .NET4 MVC4 Code First
- 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?
- How to join columns or properties of entities that belongs as many relationship to another entity in .NET EF Code First
- How to write one to many relationship query in C# linq
- How to use Future query Nhibernate in case of many to many association
- How can I use Nhibernate to retrieve data when the "WHERE IN()" have thousands of values? (too many parameters in the sql)
- NHibernate How do I query against an IList<string> property?
- How to query the first entry in each group in NHibernate
- How to Select All with a One to Many Relationship Using Linq
- linq - how do you do a query for items in one query source that are not in another one?
- How can I write the following code more elegantly using LINQ query syntax?
- How to dynamic add filters to a LINQ query against an Odata Source in C#
- How to query many-to-many relationship with 'AND' condition using LINQ and Entity Framework
- How to optimize this LINQ to EF/Sql query (many to many to many relationship)?
- Query a many to many relationship with Entity Framework and .NET 3.5
- How to query by where clause with EF code first
- How to get SQL query into LINQ form in C# code
- How linq to nhibernate by join and Separate where in query
- How can I code a Linq query to do an upward Include?
- How to provide default values in select clause of a query in LINQ to NHibernate
- How do I get active rows in 1 to many relationship using Linq?
- query and create objects with a one to many relationship using LINQ
- NHibernate LINQ query performance, which code fragment is better?
- How can we express the following code using query expression?
- How to break complex query into different methods to achieve less code complexity
- how to flatten many to many relationship
More Query from same tag
- Creating object with nested object list using LINQ to Entities
- Dynamic Create Func<T,TR> C#
- LINQ's ForEach on HashSet?
- Select last value in a month for all given IDs using LINQ
- DataContext Doesn't Exist in Dynamic Data Project?
- LINQ to SQL - Filtering the dataset between two nested collections
- Return cell with value not null using linq - Epplus
- ASP.NET MVC how to create a model which pulls in data from 2 tables, to display in 1 view
- Serialize a list<string> and use each string as xml Node
- Convert SQL query using 'count' clause, to LinQ
- How to use an expression with a generic func lambda in a linq where clause?
- How do I write a SQL Concat in Linq?
- C#: sort list of objects by DateTime property that is nullable
- How can I group by specific timestamp intervals in C# using LINQ?
- C# search query for comma delimited access database field
- Can I store LINQ query result in an array?
- Dynamically Instantiate Model object in Entity Framework DB first by passing type as parameter
- Linq InsertAllOnSubmit if not exist
- Representing a tinyint field as an enum in Entity Framework
- Using Linq to XML, how can I select the elements that have exactly x number of parent elements?
- Dynamic LINQ OrderBy for a Navigation Property using Expression in C#
- Is this the correct way to return this data using LINQ
- Split string at specific character but ignore some cases C# LINQ
- LINQ: How to join nested Lists in an ObjectCollection
- LINQ : Generics with IQueryable
- Linq expression equivalent of TSQL query
- Remove elements of one list from other list
- Entity Framework 6 - Select Parents Where Children Equal
- Linq to XML selecting children list
- MVC 4 Add error