Hi
I have following entities
A_Entity
-----------
AId
AB_Entity
-----------
AId
BId
B_Entity
-----------
BId
I have a function that helps in building the query based on the input provided. In this case I have to build a query to fetch all A_Entities that have matching BId (provided as input to the function)
public static IQueryable<A_Entity> BuildQuery(IQueryable<A_Entity> query, int BId)
{
// Something like query.where(a => a.select_all_a_that_have corresponding_b_with_Id_equalto_BId)
}
I know there has to be join between AB_Entity and A_Entity but dont know how to apply it to build IQueryable and return back.
Thanks