-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Seeking confirmation that you can't replicate linq queries in dbfunction #11759
Comments
I'm not quite following what you want to do exactly. Do you want to run a query vs a different linq provider when the method executes for the in-memory provider? That you won't be able to do. There is a re-entrance issue which currently blocks nesting calls like that. |
Thanks. yeah I even tried it with 2.1 preview. It's not logical that it would work but I don't want to put my own limitations onto your cleverness so I thought I would try. :) It's mostly so that I can state that it's not possible but I didn't want to make that statement based on an educated guess. Thanks...and closing |
We actually tried this last year. See @ajcvickers comment on Sep 15, 2017 over on #7375 It might work in the future if PR #8865 merged in but that is currently blocked by #8864 |
I just want to confirm that my findings are correct. It is not an issue.
If I have a scalar funciton that performs a calculation ala
I can replicate that logic inside a mapping which will then be used by inmemory provider.
(hat tip to @bricelam for explaining that to me).
However if I have a function that does a query, e.g. takes in an id, queries the database, returns a scalar), there is no way to replicate that as a linq query in a mapped dbfunction, correct? At least now with the static requirement. I could test the theory out on the 2.1 preview but thought I'd just ask and not waste time if the easy answer is "nope". I just wanted to be sure with 2.0.2 that I wasn't missing something.
Thanks
The text was updated successfully, but these errors were encountered: