QueryInterceptor.Core
QueryInterceptor.Core copied to clipboard
InterceptWith() ignores Includes()
When I add an interceptor before the Includes(), the includes are not made by EF:
var activeAccounts = await ctx.Accounts
.InterceptWith(new PropertyVisitor())
.Include(a => a.Subject)
.Where(a => a.IsActive)
.ToListAsync();
But this works:
var activeAccounts = await ctx.Accounts
.Include(a => a.Subject)
.Where(a => a.IsActive)
.InterceptWith(new PropertyVisitor())
.ToListAsync();
The problem is, that I need to specify the interceptor first because I'd like to expose already intercepted IQueryables in my ctx so that the InterceptWith
call is not needed by the ctx user...
FYI: I use https://github.com/StefH/Linq.PropertyTranslator.Core here...