Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CommonTable Expressions #2865

Closed
glatzert opened this issue Aug 18, 2015 · 2 comments
Closed

Support CommonTable Expressions #2865

glatzert opened this issue Aug 18, 2015 · 2 comments

Comments

@glatzert
Copy link

If you are working with trees and hierarchies, which are materialized into a SQL Server, it would be good to have a possibility of defining recursive CommonTable Expressions (as defined here: https://msdn.microsoft.com/de-de/library/ms175972.aspx).

My proposal for that: an extension method for DbContext, which returns a IQueryable:

public class MyContext : DbContext {
    public IQueryable<ComplexType> MyCTE { 
        get {
            return this.RecursiveQuery(AnchorExpression, UnionAllExpression, CteJoinExpression)
        }
    }
}

Similar would be possible for other types of CTE

@rowanmiller rowanmiller added this to the Backlog milestone Aug 19, 2015
@rowanmiller rowanmiller changed the title Provide statement which allows to define a CommonTableExpression Support CommonTable Expressions Aug 19, 2015
@shyamal890
Copy link

This is a much need feature in EF. Most of the enterprise applications need this and have to settle for SQL stored procedure which defeats the purpose of EF.

@roji
Copy link
Member

roji commented Apr 25, 2023

Duplicate of #26486

@roji roji marked this as a duplicate of #26486 Apr 25, 2023
@roji roji closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2023
@ajcvickers ajcvickers removed this from the Backlog milestone Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants