public static IQueryable <JoinItem <TLeft, TRight> > InnerJoinExt <TLeft, TRight, TKey>( this IQueryable <TLeft> left, IQueryable <TRight> right, Expression <Func <TLeft, TKey> > leftKey, Expression <Func <TRight, TKey> > rightKey ) { var result = LeftJoinExtensions.LeftJoinExt(left, right, leftKey, rightKey) .Where(a => a.Right != null); return(result); }
public static IQueryable <JoinItem <TLeft, TRight> > FullOuterJoinExt <TLeft, TRight, TKey>( this IQueryable <TLeft> left, IQueryable <TRight> right, Expression <Func <TLeft, TKey> > leftKey, Expression <Func <TRight, TKey> > rightKey) where TLeft : class where TRight : class { var leftResult = LeftJoinExtensions.LeftJoinExt(left, right, leftKey, rightKey); var rightResult = RightJoinExtensions.RightJoinExt(left, right, leftKey, rightKey); return(leftResult.Union(rightResult)); }
public static IQueryable <JoinItem <TLeft, TRight> > RightJoinExt <TLeft, TRight, TKey>( this IQueryable <TLeft> left, IQueryable <TRight> right, Expression <Func <TLeft, TKey> > leftKey, Expression <Func <TRight, TKey> > rightKey ) { var query = LeftJoinExtensions.LeftJoinExt(right, left, rightKey, leftKey); return(query.Select(t => new JoinItem <TLeft, TRight> { Left = t.Right, Right = t.Left })); }