-
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
List constructs EF uses that require non-public code access #29843
Comments
Code that compiles expression trees:
|
Based on the code above, we need to be able to:
Beyond this, applications and database providers can inject their own expressions in various places, and these may contain arbitrary code. However, I believe we can limit this code to the cases above and throw (or use Reflection) if injected code does anything else. |
As for the shape of the API we'd prefer to be able to use just the name string and declaring type to access properties and fields instead of |
As discussed offline, let's ask for a way to access backing fields of auto-properties. This isn't critical: we can use the regular API for accessing private fields, passing it the compiler-generated name (as today). But it would be good to remove knowledge of compiled-generated names from EF. The two API options for this would be:
So option 1 seems to be the preferred way for us, in any case. |
Put together a list of everything we do that operates on non-public code when we would not normally have permission to do so.
The text was updated successfully, but these errors were encountered: