score:0
Accepted answer
I was trying in EF 4.0 either we have write DB extentions for the same.
Option is provided in EF 4.1
Thanks.
score:2
You can look at the Expression
the compiler generates using IQueryable:
IQueryable<Employee> query =
from ee in entities.Employee ...
var expression = query.Expression;
Look at expression
in a debugger to see what you need to generate - LINQPad is good for this.
You might want to simplify your query a bit first:
IQueryable<Employee> query =
from ee in entities.Employee.Include("EmpEduInfo")
where
ee.name.StartsWith("t") &&
ee.EmpEduInfo.Any(x => x.name.StartsWith("t"))
select ee;
Source: stackoverflow.com
Related Articles
- Linq Expressions on Child entities
- How do you construct a LINQ to Entities query to load child objects directly, instead of calling a Reference property or Load()
- Linq To Entities - how to filter on child entities
- Enumerable.Empty<T>().AsQueryable(); This method supports the LINQ to Entities infrastructure and is not intended to be used directly from your code
- Using expressions in the "Select" part of LINQ to entities queries
- NHibernate 3.x deletes child entities when combining LINQ paging, many-to-many, and subselect fetch
- Problem with LINQ to Entities query using Sum on child object property
- Object functions fail within LINQ to Entities Expressions
- How to pass LinQ Expressions from F# to C# code
- Linq to Sql - Loading Child Entities Without Using DataLoadOptions?
- Using Specification Pattern and Expressions in Entity Framework and Linq to Entities
- LINQ Source Code Available
- Refactor Linq code and "LINQ to Entities does not recognize the method"
- creating Linq to sqlite dbml from DbLinq source code
- Stubbing Code for Test With Linq Expressions and Lambdas
- EF Code First - Linq to Entities Union EqualityComparer
- Reuse select expressions in LINQ to Entities
- linq to entities changing database connection string in code
- How can I fetch child entities as DTO in parent using reusable queries/Expression's with EF code first?
- code first approach error: the specified type member 'yyyxx' is not supported in linq to entities
- LINQ to entities Child queries where Parent has certain properties
- Fetch Items in LINQ where child entities fulfill certain conditions
- How to filter Child entities in LINQ Include query?
- LINQ to Entities returns wrong ID for an entity's child's child
- LINQ find all child entities meet requirements
- Sorting Multiple Levels of Child Collections with LINQ to Entities
- Linq Group by, Concatenate and load child entities on a list
- Linq expressions with Linq to Entities
- LINQ to Entities similar code
- source code for LINQ 101 samples
- IQueryable List<DTO> conversion
- LINQ (to objects) , running several queries over the same IEnumerable?
- Remove item from list using linq
- Error on converting XML to object using LINQ
- Check if object exists in the hierarchy using Entity Framework
- Sort list of strings by another list of strings
- return a single list property List in Linq
- Build a string from an EntityCollection
- How can I sort a json that contains win and loss data for each user as a key in C#?
- Union with Comparer
- Is Linq to NHibernate in the 2.1 Alpha release?
- How can I merge duplicate objects with Linq while concatenating a property?
- LINQ GroupBy or something else for a single loop?
- How to order Nested Collections in Linq and EF
- MVC: Displaying table data not working as expected
- Converting Hibernate linq query to HQL
- C# Linq Join 2 ObservableCollections into new one
- Linq with join, sum and group by C#
- Extract expression from BlToolkit LINQ so it can be compiled
- Simplified Linq for return to View Model