Skip to content

Is there way to translate EF Core query to WITH Queries (Common Table Expressions) ? #3228

Closed as duplicate

Description

@torgashov

Hello!
Is there way to translate EF Core query to WITH Queries (Common Table Expressions) ?
(WITH RECURSIVE)
Here is documentation:
https://www.postgresql.org/docs/current/queries-with.html

Is there a way extend EF Core or EF Core PgSQL provider?
When i looked into classes:
NpgsqlQuerySqlGeneratorFactory,
NpgsqlQuerySqlGenerator

as a variant is to override method VisitExtension, but there is a comment:
This is an internal API that supports the Entity Framework Core infrastructure ...

Maybe you have extension то extend this functions?

Can you help me?

Activity

  1. roji commented on Jul 19, 2024

    @roji
    Member

    Duplicate of dotnet/efcore#26486

  2. roji commented on Jul 19, 2024

    @roji
    Member

    Building support for CTEs needs to happen in EF itself, and isn't a small task - this is something I hope we'll tackle for EF 10. In the meantime, I suggest simply using SQL queries instead of LINQ.

  3. torgashov commented on Aug 5, 2024

    @torgashov
    Author

    Thank you for your answers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions