Is it possible to do something like this:
public static Expression<Func<EntityA, bool>> IsAGood =
x => x.A != null &&
x.A.valid;
public static Expression<Func<EntityB, bool>> IsBGood=
x => IsAGood (x.EntityA);
var res = context.EntitiesB
.Where(x => x.count > 0)
.Where(IsBGood)
I know I can compile IsAGood and run it on x.EntityA but it loads the data to memory and I don't want to do this yet. Is there a way to do this without loading to memory?