You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a DbQuery is set up with ToQuery, and that DbQuery is used in HasQueryFilter for another DbSet or DbQuery, Entity Framework tries to query a saved view rather than use the ToQuery definition.
var foos = await Context.FilteredFoos.ToListAsync();
var bars = await Context.Bars.ToListAsync();
The first call to FilteredFoos works, but the second call to Bars fails with: SqlException: Invalid object name 'FilteredFoos'. The constructed SQL for the call to Bars has WHERE EXISTS (SELECT 1 FROM FilteredFoos) rather than inject the Linq-To-Sql from ToQuery.
The text was updated successfully, but these errors were encountered:
If a
DbQuery
is set up withToQuery
, and thatDbQuery
is used inHasQueryFilter
for another DbSet or DbQuery, Entity Framework tries to query a saved view rather than use the ToQuery definition.DataContext:
The first call to
FilteredFoos
works, but the second call toBars
fails with:SqlException: Invalid object name 'FilteredFoos'
. The constructed SQL for the call toBars
hasWHERE EXISTS (SELECT 1 FROM FilteredFoos)
rather than inject the Linq-To-Sql fromToQuery
.The text was updated successfully, but these errors were encountered: