EDIT: Trying to make my problem a bit more clear.
I'm trying to build a LINQ expression that is the intersection of several LINQ statements. Right now, manually I can intersect two statements together and I'm getting the desired result.
var results =
context.UserBooleanAttributes.Where(x => x.UserAttributeID == 1 && x.Value).Select(a => a.User)
.Intersect(
context.UserBooleanAttributes.Where(y => y.UserAttributeID == 2 && y.Value).Select(b => b.User)
);
Assert.Equal(100,results.Count());
My goal is to build this dynamically, for example using a for-loop. Since I am using LINQ, I want to defer execution until I actually call something results that forces execution.