Is there a way of combining two predicates even though they are from different tables. The sql equivalent will be retrieving the results through an inner join. Albahiri documentation display nested predicates which isnt what im looking for as thats nesting the same entity within eachother which I've not issues with.
Example:
var firstPredicate = PredicateBuilder.False<Class1>() {... return predicate};
var secondPredicate = PredicateBuilder.False<Class2>() {... return predicate};
how can I make my call to the var x = db.ClassA.AsExpandable().Where(firstAndSecondPredicateCombined).ToList()
?
How can I combine these two predicates to retrieve the results from just Class 2 as an example?
I ask because I have a method that retrieves results from a single table however the user is given the ability to filter based on multiple criteria and some of that critieria is not available in the first table and is not a foreign key.
Class A and B are related via A and B, Class A and C are related via F
I want to return only B but also want to search via Property G in C.
The Relations
Class A
A
B
C
F
Class B
A
B
D
E
Class C
F
G
H