813 votesMatthieu MEZIL supported this idea ·
Resetting status to reflect current state of EF Core. Some of this functionality is available to EF6-based applications: only access to store DbExpression trees and DbCommand are available, and there are no plans for adding a LINQ level interception point.
We already can do something like this.
For example, I did it to add Table Valued Functions for example. (http://msmvps.com/blogs/matthieu/archive/2010/07/01/how-to-include-recursion-table-valued-functions-in-linq-to-entities-queries-with-ef4-v2.aspx). However, I think that it should be great to be able to use the EF materializer.
Why do you need it?
Resurrecting this until we have true mapping to TVFs in EF Core.
Entity Framework Core supports invoking TVFs in a FromSql() call. But does not provide mapping for TVFs.
I wrote a post to be able to do it with EF4 but it's really not perfect.
Issue tracking this feature: https://github.com/aspnet/EntityFramework/issues/1833.
You can do it with EF4 even if it is less simple than the method you propose.
I wrote a post on it http://msmvps.com/blogs/matthieu/archive/2009/10/07/ef-include-with-where-clause.aspx