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

Modify query expression #4048

Closed
ghost opened this issue Dec 11, 2015 · 8 comments
Closed

Modify query expression #4048

ghost opened this issue Dec 11, 2015 · 8 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Dec 11, 2015

Hi,

how to modify the expression before executing ?

Regards.

@rowanmiller
Copy link
Contributor

@mfernandezruiz do you want to modify the raw SQL or the query tree?

@ghost
Copy link
Author

ghost commented Dec 23, 2015

The query tree

@rowanmiller
Copy link
Contributor

cc @maumar @anpete - any pointers you can give?

@ghost
Copy link
Author

ghost commented Dec 24, 2015

I am implementing a soft delete feature, and need to modify the query tree
before IQueryProvider.Execute is invoked so I can then add conditions to
the query tree as needed. The purpose is to obtain an outcome of the query
where those entities with the flag IsDeleted set to true, are removed.

Merry xmas !

2015-12-23 22:51 GMT+01:00 Rowan Miller notifications@github.com:

cc @maumar https://github.com/maumar @anpete https://github.com/anpete

  • any pointers you can give?


Reply to this email directly or view it on GitHub
#4048 (comment)
.

@rowanmiller rowanmiller added this to the Discussions milestone Jan 6, 2016
@rowanmiller
Copy link
Contributor

@anpete to provide some pointers

@santiag0sc
Copy link

Hello all !

I am pretty interested on the subject. As a gent reminder, do we have any news around this topic ?

VBRegards.
Santiago.

@anpete
Copy link
Contributor

anpete commented Jul 15, 2016

@mfernandezruiz @santiag0sc The easiest place right now to intercept the LINQ expression tree is probably IQueryCompiler.

The general approach would be to register a custom impl. of IQueryCompiler (likely a subclass or decorator of our concrete QueryCompiler class), and perform the interception around the various Execute methods.

@anpete
Copy link
Contributor

anpete commented Jul 15, 2016

Here are the docs for custom service registration: https://docs.efproject.net/en/latest/miscellaneous/internals/services.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants