Let's say I need create custom expression to make some manipulation with IQueryable<x>
and IQueryable<y>
. Regretfully I do not have idea how to implement this. This is my try:
public static IQueryable<T> JoinQueries<T>(this IQueryable<T> query, IQueryable<T> expr)
{
if (query == null)
throw new ArgumentNullException("query");
//Here we make Join for x and and return result something like this:
query = from a in query join b in expr on a.Id equals b.Id select a;
return query;
}
Or say other words I need result like this:
IQueryable <somevalue> x = query.CustomJoinExtension(Iqueryablevalue);