Namespace: Fluentsoft.System.Linq
Assembly: fluentsoft.queryable.dll
Package: Fluentsoft.Queryable
class | Description |
---|---|
Queryable | Extension methods for IQueryable |
ExpressionExtensions | Extsnsions methods for Expression |
Provides a set of extensions methods for querying data structures that implement IQueryable.
Method | Description |
---|---|
IQueryable<TResult> LeftOuterJoin<TOuter, TInner, TKey, TResult>(IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKey, Expression<Func<TInner, TKey>> innerKey, Expression<Func<TOuter, TInner?, TResult>> resultSelector) | Correlates all records from the left table, and the matching records from the right table based on matching keys |
IQueryable<TResult> RightOuterJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IQueryableTInner> inner, Expression<Func<TOuter, TKey>> outerKey, Expression<Func<TInner, TKey>> innerKey, Expression<Func<TOuter?, TInner, TResult>> resultSelector) | Correlates all records from the right table, and the matching records from the left table based on matching keys |
IQueryable<TResult> FullOuterJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IQueryable<TInner> inner, Expression<Func<TOuter, TKey>> outerKey, Expression<Func<TInner, TKey>> innerKey, Expression<Func<TOuter?, TInner?, TResult>> resultSelector) | Correlates all records from the right table, and all records from the left table based on matching keys |
IQueryable<TResult> Select<T, TResult, T1, T2>(IQueryable<T> source, Expression<Func<T1, T2, TResult>> selector) | Projects each element of a sequence into a new form. |
IQueryable<TResult> Select<T, TResult, T1, T2, T3>(IQueryable<T> source, Expression<Func<T1, T2, T3, TResult>> selector) | Projects each element of a sequence into a new form. |
IQueryable<T> Where<T, T1, T2, T3>(IQueryable<T> source, Expression<Func<T1, T2, T3, bool>> predicate) | Filters a sequence of values based on a predicate with three arguments taken from source value by splitting. |
IQueryable<T> Where<T, T1, T2>(IQueryable<T> source, Expression<Func<T1, T2, bool>> predicate) | Filters a sequence of values based on a predicate with two arguments taken from source value by splitting. |
Correlates all records from the left table, and the matching records from the right table based on matching keys
public static IQueryable<TResult> LeftOuterJoin<TOuter, TInner, TKey, TResult>(this
IQueryable<TOuter> outer,
IEnumerable<TInner> inner,
Expression<Func<TOuter, TKey>> outerKey,
Expression<Func<TInner, TKey>> innerKey,
Expression<Func<TOuter, TInner?, TResult>> resultSelector);
TOuter
The type of the elements of the first sequence.
TInner
The type of the elements of the second sequence.
TKey
The type of the keys returned by the key selector functions.
TResult
The type of the result elements.
outer
IQueryable<TOuter>
The first sequence to join.
inner
IEnumerable<TInner>
The sequence to join to the first sequence.
outerKeySelector
Expression<Func<TOuter,TKey>>
A function to extract the join key from each element of the first sequence.
innerKeySelector
Expression<Func<TInner,TKey>>
A function to extract the join key from each element of the second sequence.
resultSelector
Expression<Func<TOuter,TInner,TResult>>
A function to create a result element from two matching elements.
IQueryable<TResult>
An IQueryable<T> that has elements of type TResult obtained by performing an left outer join on two sequences.
ctx.Departments.LeftOuterJoin(ctx.Employees,
z => z.ID,
z => z.DepartmentID,
(department, employee) => new
{
Department = department.Name,
Employee = employee.Name,
})
public static IQueryable<TResult> RughtOuterJoin<TOuter, TInner, TKey, TResult>(this
IEnumerable<TOuter> outer,
IQueryable<TInner> inner,
Expression<Func<TOuter, TKey>> outerKey,
Expression<Func<TInner, TKey>> innerKey,
Expression<Func<TOuter, TInner?, TResult>> resultSelector);
TOuter
The type of the elements of the first sequence.
TInner
The type of the elements of the second sequence.
TKey
The type of the keys returned by the key selector functions.
TResult
The type of the result elements.
outer
IEnumerable<TOuter>
The first sequence to join.
inner
IQueryable<TInner>
The sequence to join to the first sequence.
outerKeySelector
Expression<Func<TOuter,TKey>>
A function to extract the join key from each element of the first sequence.
innerKeySelector
Expression<Func<TInner,TKey>>
A function to extract the join key from each element of the second sequence.
resultSelector
Expression<Func<TOuter,TInner,TResult>>
A function to create a result element from two matching elements.
IQueryable<TResult>
An IQueryable<T> that has elements of type TResult obtained by performing an right outer join on two sequences.
ctx.Departments.RightOuterJoin(ctx.Employees,
z => z.ID,
z => z.DepartmentID,
(department, employee) => new
{
Department = department.Name,
Employee = employee.Name,
})
public static IQueryable<TResult> FullOuterJoin<TOuter, TInner, TKey, TResult>(this
IQueryable<TOuter> outer,
IQueryable<TInner> inner,
Expression<Func<TOuter, TKey>> outerKey,
Expression<Func<TInner, TKey>> innerKey,
Expression<Func<TOuter, TInner?, TResult>> resultSelector);
TOuter
The type of the elements of the first sequence.
TInner
The type of the elements of the second sequence.
TKey
The type of the keys returned by the key selector functions.
TResult
The type of the result elements.
outer
IQueryable<TOuter>
The first sequence to join.
inner
IQueryable<TInner>
The sequence to join to the first sequence.
outerKeySelector
Expression<Func<TOuter,TKey>>
A function to extract the join key from each element of the first sequence.
innerKeySelector
Expression<Func<TInner,TKey>>
A function to extract the join key from each element of the second sequence.
resultSelector
Expression<Func<TOuter,TInner,TResult>>
A function to create a result element from two matching elements.
IQueryable<TResult>
An IQueryable<T> that has elements of type TResult
obtained by performing an full outer join on two sequences.
ctx.Departments.FullOuterJoin(ctx.Employees,
z => z.ID,
z => z.DepartmentID,
(department, employee) => new
{
Department = department.Name,
Employee = employee.Name,
})
Method | Description |
---|---|
Expression<Func<T2, T1, TResult>> SwitchParameters<T1, T2, TResult>(Expression<Func<T1, T2, TResult>> expression) | Translate the source to result expression by switch arguments |
Expression<Func<T, TResult>> SplitParameters<T1, T2, T, TResult>(this Expression<Func<T1, T2, TResult>> expression) | Translate source with two arguments to expression with type where arguments are property of that type |
Expression<Func<T, TResult>> SplitParameters<T1, T2, T3, T, TResult>(this Expression<Func<T1, T2, T3, TResult>> expression) | Translate source with two arguments to expression with type where arguments are property of that type |