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

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

Closed
torgashov opened this issue Jul 19, 2024 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@torgashov
Copy link

torgashov commented Jul 19, 2024

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?

@roji
Copy link
Member

roji commented Jul 19, 2024

Duplicate of dotnet/efcore#26486

@roji roji marked this as a duplicate of dotnet/efcore#26486 Jul 19, 2024
@roji roji closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2024
@roji
Copy link
Member

roji commented Jul 19, 2024

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.

@roji roji added the duplicate This issue or pull request already exists label Jul 19, 2024
@torgashov
Copy link
Author

Thank you for your answers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants