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

Cannot use DbSet in query filter #17111

Closed
smitpatel opened this issue Aug 12, 2019 · 1 comment
Closed

Cannot use DbSet in query filter #17111

smitpatel opened this issue Aug 12, 2019 · 1 comment
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@smitpatel
Copy link
Member

DbSet is getting funcletized. We need to process it differently to get the EntityQueryable out.

@ajcvickers ajcvickers added this to the 3.0.0 milestone Aug 14, 2019
maumar added a commit that referenced this issue Aug 16, 2019
…ning query

During nav expansion, when visiting EntityQueryables we now peek into entity metadata looking for defining query and query filter. If they are found, nav expansion applies them and expands navigations in the resulting query (recursively).

Also, fix to #17111 - Cannot use DbSet in query filter

DbSet accesses are converted into EntityQueryables during model finialization. We need to do this early, because otherwise we would need a dbcontext to create a queryable, and that dbcontext could be disposed at the time nav expansion runs.
Since FromSql/FromSqlRaw/FromSqlInterpolated are constrained to DbSet<T> they need to be converted to FromSqlOnQueryable at the same time.
maumar added a commit that referenced this issue Aug 17, 2019
…ning query

During nav expansion, when visiting EntityQueryables we now peek into entity metadata looking for defining query and query filter. If they are found, nav expansion applies them and expands navigations in the resulting query (recursively).

Also, fix to #17111 - Cannot use DbSet in query filter

DbSet accesses are converted into EntityQueryables during model finialization. We need to do this early, because otherwise we would need a dbcontext to create a queryable, and that dbcontext could be disposed at the time nav expansion runs.
Since FromSql/FromSqlRaw/FromSqlInterpolated are constrained to DbSet<T> they need to be converted to FromSqlOnQueryable at the same time.
maumar added a commit that referenced this issue Aug 19, 2019
…ning query

During nav expansion, when visiting EntityQueryables we now peek into entity metadata looking for defining query and query filter. If they are found, nav expansion applies them and expands navigations in the resulting query (recursively).

Also, fix to #17111 - Cannot use DbSet in query filter

DbSet accesses are converted into EntityQueryables during model finialization. We need to do this early, because otherwise we would need a dbcontext to create a queryable, and that dbcontext could be disposed at the time nav expansion runs.
Since FromSql/FromSqlRaw/FromSqlInterpolated are constrained to DbSet<T> they need to be converted to FromSqlOnQueryable at the same time.
maumar added a commit that referenced this issue Aug 19, 2019
…ning query

During nav expansion, when visiting EntityQueryables we now peek into entity metadata looking for defining query and query filter. If they are found, nav expansion applies them and expands navigations in the resulting query (recursively).

Also, fix to #17111 - Cannot use DbSet in query filter

DbSet accesses are converted into EntityQueryables during model finialization. We need to do this early, because otherwise we would need a dbcontext to create a queryable, and that dbcontext could be disposed at the time nav expansion runs.
Since FromSql/FromSqlRaw/FromSqlInterpolated are constrained to DbSet<T> they need to be converted to FromSqlOnQueryable at the same time.
maumar added a commit that referenced this issue Aug 20, 2019
…ning query

During nav expansion, when visiting EntityQueryables we now peek into entity metadata looking for defining query and query filter. If they are found, nav expansion applies them and expands navigations in the resulting query (recursively).

Also, fix to #17111 - Cannot use DbSet in query filter

DbSet accesses are converted into EntityQueryables during model finialization. We need to do this early, because otherwise we would need a dbcontext to create a queryable, and that dbcontext could be disposed at the time nav expansion runs.
Since FromSql/FromSqlRaw/FromSqlInterpolated are constrained to DbSet<T> they need to be converted to FromSqlOnQueryable at the same time.
maumar added a commit that referenced this issue Aug 20, 2019
…ning query

During nav expansion, when visiting EntityQueryables we now peek into entity metadata looking for defining query and query filter. If they are found, nav expansion applies them and expands navigations in the resulting query (recursively).

Also, fix to #17111 - Cannot use DbSet in query filter

DbSet accesses are converted into EntityQueryables during model finialization. We need to do this early, because otherwise we would need a dbcontext to create a queryable, and that dbcontext could be disposed at the time nav expansion runs.
Since FromSql/FromSqlRaw/FromSqlInterpolated are constrained to DbSet<T> they need to be converted to FromSqlOnQueryable at the same time.
@maumar
Copy link
Contributor

maumar commented Aug 20, 2019

fixed in 3085673

@maumar maumar closed this as completed Aug 20, 2019
@maumar maumar added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Aug 20, 2019
smitpatel pushed a commit that referenced this issue Aug 21, 2019
…ning query

During nav expansion, when visiting EntityQueryables we now peek into entity metadata looking for defining query and query filter. If they are found, nav expansion applies them and expands navigations in the resulting query (recursively).

Also, fix to #17111 - Cannot use DbSet in query filter

DbSet accesses are converted into EntityQueryables during model finialization. We need to do this early, because otherwise we would need a dbcontext to create a queryable, and that dbcontext could be disposed at the time nav expansion runs.
Since FromSql/FromSqlRaw/FromSqlInterpolated are constrained to DbSet<T> they need to be converted to FromSqlOnQueryable at the same time.
@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview9 Aug 21, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0-preview9, 3.0.0 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

3 participants