-
Notifications
You must be signed in to change notification settings - Fork 6
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
Non-intrusive Mode #13
Labels
enhancement
New feature or request
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Automatically treats
IEnumerable<T>
types composed in a LINQ expression as if they were provided via theAsQueryableValues
method. I'm assuming that the direct use of theIEnumerable<T>
type is likely to have a non-constant sequence of values.There's also the legitime case of not wanting to use
QueryableValues
. Like having a small list of constant values that I want hardcoded in the T-SQL, so I can useT[]
orList<T>
for these.Some desired attributes:
IEnumerable<T>
so they can also be treated this way per user needs.Examples
With non-intrusive mode
On
, the following two queries will useQueryableValues
(in both cases the values will be parameterized in the T-SQL query):With non-intrusive mode
On
, the first query will useQueryableValues
and the second will not (the values will be hardcoded in the T-SQL instead of being parameterized):Motivation
Not having to introduce an alien method (
AsQueryableValues
) in our EF queries is better for portability.Ideas
Maybe be something around rewriting the original LINQ expression at some point in the EF query processing pipeline. Find
IEnumerable<T>
and replace withAsQueryableValues(DbContext, IEnumerable<T>)
.The text was updated successfully, but these errors were encountered: