Table of Contents

Class EntityQueryExtensions

Namespace
System.Linq
Assembly
Instagile.dll
public static class EntityQueryExtensions
Inheritance
EntityQueryExtensions
Inherited Members

Methods

AllAsync<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, bool>>, CancellationToken?)

[DynamicDependency("All`1", typeof(Enumerable))]
public static Task<bool> AllAsync<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<TSource>
predicate Expression<Func<TSource, bool>>
cancellationToken CancellationToken?

Returns

Task<bool>

Type Parameters

TSource

All<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, bool>>)

[DynamicDependency("All`1", typeof(Enumerable))]
public static bool All<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, bool>> predicate)

Parameters

source IEntityQuery<TSource>
predicate Expression<Func<TSource, bool>>

Returns

bool

Type Parameters

TSource

AnyAsync<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, bool>>, CancellationToken?)

[DynamicDependency("Any`1", typeof(Enumerable))]
public static Task<bool> AnyAsync<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<TSource>
predicate Expression<Func<TSource, bool>>
cancellationToken CancellationToken?

Returns

Task<bool>

Type Parameters

TSource

AnyAsync<TSource>(IEntityQuery<TSource>, CancellationToken?)

[DynamicDependency("Any`1", typeof(Enumerable))]
public static Task<bool> AnyAsync<TSource>(this IEntityQuery<TSource> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<TSource>
cancellationToken CancellationToken?

Returns

Task<bool>

Type Parameters

TSource

Any<TSource>(IEntityQuery<TSource>)

[DynamicDependency("Any`1", typeof(Enumerable))]
public static bool Any<TSource>(this IEntityQuery<TSource> source)

Parameters

source IEntityQuery<TSource>

Returns

bool

Type Parameters

TSource

Any<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, bool>>)

[DynamicDependency("Any`1", typeof(Enumerable))]
public static bool Any<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, bool>> predicate)

Parameters

source IEntityQuery<TSource>
predicate Expression<Func<TSource, bool>>

Returns

bool

Type Parameters

TSource

AsReadOperation(IEntityQuery, TranslationPolicy?)

public static IOpGenerator AsReadOperation(this IEntityQuery target, TranslationPolicy? policy = null)

Parameters

target IEntityQuery
policy TranslationPolicy

Returns

IOpGenerator

AsReadOperation<T>(IEntityQuery<T>, TranslationPolicy?)

public static IOpGenerator<T> AsReadOperation<T>(this IEntityQuery<T> target, TranslationPolicy? policy = null)

Parameters

target IEntityQuery<T>
policy TranslationPolicy

Returns

IOpGenerator<T>

Type Parameters

T

Average(IEntityQuery<decimal>)

[DynamicDependency("Average", typeof(Enumerable))]
public static decimal Average(this IEntityQuery<decimal> source)

Parameters

source IEntityQuery<decimal>

Returns

decimal

Average(IEntityQuery<double>)

[DynamicDependency("Average", typeof(Enumerable))]
public static double Average(this IEntityQuery<double> source)

Parameters

source IEntityQuery<double>

Returns

double

Average(IEntityQuery<int>)

[DynamicDependency("Average", typeof(Enumerable))]
public static double Average(this IEntityQuery<int> source)

Parameters

source IEntityQuery<int>

Returns

double

Average(IEntityQuery<long>)

[DynamicDependency("Average", typeof(Enumerable))]
public static double Average(this IEntityQuery<long> source)

Parameters

source IEntityQuery<long>

Returns

double

Average(IEntityQuery<float>)

[DynamicDependency("Average", typeof(Enumerable))]
public static float Average(this IEntityQuery<float> source)

Parameters

source IEntityQuery<float>

Returns

float

AverageAsync(IEntityQuery<decimal>, CancellationToken?)

[DynamicDependency("Average", typeof(Enumerable))]
public static Task<decimal> AverageAsync(this IEntityQuery<decimal> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<decimal>
cancellationToken CancellationToken?

Returns

Task<decimal>

AverageAsync(IEntityQuery<double>, CancellationToken?)

[DynamicDependency("Average", typeof(Enumerable))]
public static Task<double> AverageAsync(this IEntityQuery<double> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<double>
cancellationToken CancellationToken?

Returns

Task<double>

AverageAsync(IEntityQuery<int>, CancellationToken?)

[DynamicDependency("Average", typeof(Enumerable))]
public static Task<double> AverageAsync(this IEntityQuery<int> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<int>
cancellationToken CancellationToken?

Returns

Task<double>

AverageAsync(IEntityQuery<long>, CancellationToken?)

[DynamicDependency("Average", typeof(Enumerable))]
public static Task<double> AverageAsync(this IEntityQuery<long> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<long>
cancellationToken CancellationToken?

Returns

Task<double>

AverageAsync(IEntityQuery<float>, CancellationToken?)

[DynamicDependency("Average", typeof(Enumerable))]
public static Task<float> AverageAsync(this IEntityQuery<float> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<float>
cancellationToken CancellationToken?

Returns

Task<float>

AverageAsync<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, decimal>>, CancellationToken?)

[DynamicDependency("Average`1", typeof(Enumerable))]
public static Task<decimal> AverageAsync<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, decimal>> selector, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, decimal>>
cancellationToken CancellationToken?

Returns

Task<decimal>

Type Parameters

TSource

AverageAsync<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, double>>, CancellationToken?)

[DynamicDependency("Average`1", typeof(Enumerable))]
public static Task<double> AverageAsync<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, double>> selector, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, double>>
cancellationToken CancellationToken?

Returns

Task<double>

Type Parameters

TSource

AverageAsync<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, int>>, CancellationToken?)

[DynamicDependency("Average`1", typeof(Enumerable))]
public static Task<double> AverageAsync<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, int>> selector, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, int>>
cancellationToken CancellationToken?

Returns

Task<double>

Type Parameters

TSource

AverageAsync<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, long>>, CancellationToken?)

[DynamicDependency("Average`1", typeof(Enumerable))]
public static Task<double> AverageAsync<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, long>> selector, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, long>>
cancellationToken CancellationToken?

Returns

Task<double>

Type Parameters

TSource

AverageAsync<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, float>>, CancellationToken?)

[DynamicDependency("Average`1", typeof(Enumerable))]
public static Task<float> AverageAsync<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, float>> selector, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, float>>
cancellationToken CancellationToken?

Returns

Task<float>

Type Parameters

TSource

Average<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, decimal>>)

[DynamicDependency("Average`1", typeof(Enumerable))]
public static decimal Average<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, decimal>> selector)

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, decimal>>

Returns

decimal

Type Parameters

TSource

Average<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, double>>)

[DynamicDependency("Average`1", typeof(Enumerable))]
public static double Average<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, double>> selector)

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, double>>

Returns

double

Type Parameters

TSource

Average<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, int>>)

[DynamicDependency("Average`1", typeof(Enumerable))]
public static double Average<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, int>> selector)

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, int>>

Returns

double

Type Parameters

TSource

Average<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, long>>)

[DynamicDependency("Average`1", typeof(Enumerable))]
public static double Average<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, long>> selector)

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, long>>

Returns

double

Type Parameters

TSource

Average<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, float>>)

[DynamicDependency("Average`1", typeof(Enumerable))]
public static float Average<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, float>> selector)

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, float>>

Returns

float

Type Parameters

TSource

Cast<TResult>(IEntityQuery)

[DynamicDependency("Cast`1", typeof(Enumerable))]
public static IEntityQuery<TResult> Cast<TResult>(this IEntityQuery source)

Parameters

source IEntityQuery

Returns

IEntityQuery<TResult>

Type Parameters

TResult

ChangeContext<T>(IEntityQuery<T>, IEntityContext)

public static IEntityQuery<T> ChangeContext<T>(this IEntityQuery<T> source, IEntityContext context) where T : IEntity

Parameters

source IEntityQuery<T>
context IEntityContext

Returns

IEntityQuery<T>

Type Parameters

T

Concat<TSource>(IEntityQuery<TSource>, IEntityQuery<TSource>)

[DynamicDependency("Concat`1", typeof(Enumerable))]
public static IEntityQuery<TSource> Concat<TSource>(this IEntityQuery<TSource> source1, IEntityQuery<TSource> source2)

Parameters

source1 IEntityQuery<TSource>
source2 IEntityQuery<TSource>

Returns

IEntityQuery<TSource>

Type Parameters

TSource

CountAsync<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, bool>>, CancellationToken?)

[DynamicDependency("Count`1", typeof(Enumerable))]
public static Task<int> CountAsync<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<TSource>
predicate Expression<Func<TSource, bool>>
cancellationToken CancellationToken?

Returns

Task<int>

Type Parameters

TSource

CountAsync<TSource>(IEntityQuery<TSource>, CancellationToken?)

[DynamicDependency("Count`1", typeof(Enumerable))]
public static Task<int> CountAsync<TSource>(this IEntityQuery<TSource> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<TSource>
cancellationToken CancellationToken?

Returns

Task<int>

Type Parameters

TSource

Count<TSource>(IEntityQuery<TSource>)

[DynamicDependency("Count`1", typeof(Enumerable))]
public static int Count<TSource>(this IEntityQuery<TSource> source)

Parameters

source IEntityQuery<TSource>

Returns

int

Type Parameters

TSource

Count<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, bool>>)

[DynamicDependency("Count`1", typeof(Enumerable))]
public static int Count<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, bool>> predicate)

Parameters

source IEntityQuery<TSource>
predicate Expression<Func<TSource, bool>>

Returns

int

Type Parameters

TSource

Distinct<TSource>(IEntityQuery<TSource>)

[DynamicDependency("Distinct`1", typeof(Enumerable))]
public static IEntityQuery<TSource> Distinct<TSource>(this IEntityQuery<TSource> source)

Parameters

source IEntityQuery<TSource>

Returns

IEntityQuery<TSource>

Type Parameters

TSource

ElementAtAsync<T>(IEntityQuery<T>, int, CancellationToken?)

[DynamicDependency("ElementAt`2", typeof(Enumerable))]
public static Task<T> ElementAtAsync<T>(this IEntityQuery<T> source, int index, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
index int
cancellationToken CancellationToken?

Returns

Task<T>

Type Parameters

T

ElementAtOrDefaultAsync<T>(IEntityQuery<T>, int, CancellationToken?)

[DynamicDependency("ElementAtOrDefault`2", typeof(Enumerable))]
public static Task<T?> ElementAtOrDefaultAsync<T>(this IEntityQuery<T> source, int index, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
index int
cancellationToken CancellationToken?

Returns

Task<T>

Type Parameters

T

ElementAtOrDefault<T>(IEntityQuery<T>, int)

[DynamicDependency("ElementAtOrDefault`2", typeof(Enumerable))]
public static T? ElementAtOrDefault<T>(this IEntityQuery<T> source, int index)

Parameters

source IEntityQuery<T>
index int

Returns

T

Type Parameters

T

ElementAt<T>(IEntityQuery<T>, int)

[DynamicDependency("ElementAt`2", typeof(Enumerable))]
public static T ElementAt<T>(this IEntityQuery<T> source, int index)

Parameters

source IEntityQuery<T>
index int

Returns

T

Type Parameters

T

Except<TSource>(IEntityQuery<TSource>, IEntityQuery<TSource>)

[DynamicDependency("Except`1", typeof(Enumerable))]
public static IEntityQuery<TSource> Except<TSource>(this IEntityQuery<TSource> source1, IEntityQuery<TSource> source2)

Parameters

source1 IEntityQuery<TSource>
source2 IEntityQuery<TSource>

Returns

IEntityQuery<TSource>

Type Parameters

TSource

FirstAsync<T>(IEntityQuery<T>, Expression<Func<T, bool>>, CancellationToken?)

[DynamicDependency("First`2", typeof(Enumerable))]
public static Task<T> FirstAsync<T>(this IEntityQuery<T> source, Expression<Func<T, bool>> predicate, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
predicate Expression<Func<T, bool>>
cancellationToken CancellationToken?

Returns

Task<T>

Type Parameters

T

FirstAsync<T>(IEntityQuery<T>, CancellationToken?)

[DynamicDependency("First`1", typeof(Enumerable))]
public static Task<T> FirstAsync<T>(this IEntityQuery<T> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
cancellationToken CancellationToken?

Returns

Task<T>

Type Parameters

T

FirstOrDefaultAsync<T>(IEntityQuery<T>, Expression<Func<T, bool>>, CancellationToken?)

[DynamicDependency("FirstOrDefault`2", typeof(Enumerable))]
public static Task<T?> FirstOrDefaultAsync<T>(this IEntityQuery<T> source, Expression<Func<T, bool>> predicate, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
predicate Expression<Func<T, bool>>
cancellationToken CancellationToken?

Returns

Task<T>

Type Parameters

T

FirstOrDefaultAsync<T>(IEntityQuery<T>, CancellationToken?)

[DynamicDependency("FirstOrDefault`1", typeof(Enumerable))]
public static Task<T?> FirstOrDefaultAsync<T>(this IEntityQuery<T> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
cancellationToken CancellationToken?

Returns

Task<T>

Type Parameters

T

FirstOrDefault<T>(IEntityQuery<T>)

[DynamicDependency("FirstOrDefault`1", typeof(Enumerable))]
public static T? FirstOrDefault<T>(this IEntityQuery<T> source)

Parameters

source IEntityQuery<T>

Returns

T

Type Parameters

T

FirstOrDefault<T>(IEntityQuery<T>, Expression<Func<T, bool>>)

[DynamicDependency("FirstOrDefault`2", typeof(Enumerable))]
public static T? FirstOrDefault<T>(this IEntityQuery<T> source, Expression<Func<T, bool>> predicate)

Parameters

source IEntityQuery<T>
predicate Expression<Func<T, bool>>

Returns

T

Type Parameters

T

First<T>(IEntityQuery<T>)

[DynamicDependency("First`1", typeof(Enumerable))]
public static T First<T>(this IEntityQuery<T> source)

Parameters

source IEntityQuery<T>

Returns

T

Type Parameters

T

First<T>(IEntityQuery<T>, Expression<Func<T, bool>>)

[DynamicDependency("First`2", typeof(Enumerable))]
public static T First<T>(this IEntityQuery<T> source, Expression<Func<T, bool>> predicate)

Parameters

source IEntityQuery<T>
predicate Expression<Func<T, bool>>

Returns

T

Type Parameters

T

FreezeAsync<T>(IEntityQuery<T>, CancellationToken?)

public static Task<IFrozenQuery<T>> FreezeAsync<T>(this IEntityQuery<T> source, CancellationToken? cancellationToken = null) where T : IEntity

Parameters

source IEntityQuery<T>
cancellationToken CancellationToken?

Returns

Task<IFrozenQuery<T>>

Type Parameters

T

Freeze<T>(IEntityQuery<T>)

public static IFrozenQuery<T> Freeze<T>(this IEntityQuery<T> source) where T : IEntity

Parameters

source IEntityQuery<T>

Returns

IFrozenQuery<T>

Type Parameters

T

Include<T>(IEntityQuery<T>, IEnumerable<RelationshipPath>, bool)

Specifies related entities to include in the query results using a collection of RelationshipPaths. Equivalent to calling Include() for each relationship path.

public static IEntityQuery<T> Include<T>(this IEntityQuery<T> source, IEnumerable<RelationshipPath> paths, bool throwIfUnauthorised = false) where T : IEntity

Parameters

source IEntityQuery<T>

The source query.

paths IEnumerable<RelationshipPath>

The relationship paths.

throwIfUnauthorised bool

If true, throws SecurityException when the principal lacks read access to any entity type in the path. If false (default), the include stops at the first unauthorised segment.

Returns

IEntityQuery<T>

An entity query.

Type Parameters

T

The entity type of the query.

Include<T>(IEntityQuery<T>, RelationshipInfo, bool)

Specifies related entities to include in the query results using a RelationshipInfo. Equivalent to calling Include(e => e.Relationship).

public static IEntityQuery<T> Include<T>(this IEntityQuery<T> source, RelationshipInfo metadata, bool throwIfUnauthorised = false) where T : IEntity

Parameters

source IEntityQuery<T>

The source query.

metadata RelationshipInfo

The relationship metadata.

throwIfUnauthorised bool

If true, throws SecurityException when the principal lacks read access to the related entity type. If false (default), the include is silently skipped.

Returns

IEntityQuery<T>

An entity query.

Type Parameters

T

The entity type of the query.

Include<T>(IEntityQuery<T>, RelationshipPath, bool)

Specifies related entities to include in the query results using a RelationshipPath. Equivalent to calling Include().ThenInclude()... for each relationship in the path.

public static IEntityQuery<T> Include<T>(this IEntityQuery<T> source, RelationshipPath path, bool throwIfUnauthorised = false) where T : IEntity

Parameters

source IEntityQuery<T>

The source query.

path RelationshipPath

The relationship path.

throwIfUnauthorised bool

If true, throws SecurityException when the principal lacks read access to any entity type in the path. If false (default), the include stops at the first unauthorised segment.

Returns

IEntityQuery<T>

An entity query.

Type Parameters

T

The entity type of the query.

Include<T, U>(IEntityQuery<T>, Expression<Func<T, IEntitySet<U>>>, bool)

Specifies related entities to include in the query results using a collection.

public static IIncludedEntityQuery<T, U> Include<T, U>(this IEntityQuery<T> source, Expression<Func<T, IEntitySet<U>>> selector, bool throwIfUnauthorised = false) where T : IEntity where U : IEntity

Parameters

source IEntityQuery<T>

The source query.

selector Expression<Func<T, IEntitySet<U>>>

An expression selecting the related entity collection property.

throwIfUnauthorised bool

If true, throws SecurityException when the principal lacks read access to the related entity type. If false (default), the include is silently skipped.

Returns

IIncludedEntityQuery<T, U>

An included entity query.

Type Parameters

T

The entity type of the query.

U

The related entity type to include.

Include<T, U>(IEntityQuery<T>, Expression<Func<T, U?>>, bool)

Specifies related entity to include in the query results using a reference.

public static IIncludedEntityQuery<T, U> Include<T, U>(this IEntityQuery<T> source, Expression<Func<T, U?>> selector, bool throwIfUnauthorised = false) where T : IEntity where U : IEntity

Parameters

source IEntityQuery<T>

The source query.

selector Expression<Func<T, U>>

An expression selecting the related entity property.

throwIfUnauthorised bool

If true, throws SecurityException when the principal lacks read access to the related entity type. If false (default), the include is silently skipped.

Returns

IIncludedEntityQuery<T, U>

An included entity query.

Type Parameters

T

The entity type of the query.

U

The related entity type to include.

Intersect<TSource>(IEntityQuery<TSource>, IEntityQuery<TSource>)

[DynamicDependency("Intersect`1", typeof(Enumerable))]
public static IEntityQuery<TSource> Intersect<TSource>(this IEntityQuery<TSource> source1, IEntityQuery<TSource> source2)

Parameters

source1 IEntityQuery<TSource>
source2 IEntityQuery<TSource>

Returns

IEntityQuery<TSource>

Type Parameters

TSource

MaxAsync<T>(IEntityQuery<T>, CancellationToken?)

[DynamicDependency("Max`1", typeof(Enumerable))]
public static Task<T> MaxAsync<T>(this IEntityQuery<T> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
cancellationToken CancellationToken?

Returns

Task<T>

Type Parameters

T

MaxAsync<T, U>(IEntityQuery<T>, Expression<Func<T, U>>, CancellationToken?)

[DynamicDependency("Max`2", typeof(Enumerable))]
public static Task<U> MaxAsync<T, U>(this IEntityQuery<T> source, Expression<Func<T, U>> projection, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, U>>
cancellationToken CancellationToken?

Returns

Task<U>

Type Parameters

T
U

Max<T>(IEntityQuery<T>)

[DynamicDependency("Max`1", typeof(Enumerable))]
public static T Max<T>(this IEntityQuery<T> source)

Parameters

source IEntityQuery<T>

Returns

T

Type Parameters

T

Max<T, U>(IEntityQuery<T>, Expression<Func<T, U>>)

[DynamicDependency("Max`2", typeof(Enumerable))]
public static U Max<T, U>(this IEntityQuery<T> source, Expression<Func<T, U>> projection)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, U>>

Returns

U

Type Parameters

T
U

MinAsync<T>(IEntityQuery<T>, CancellationToken?)

[DynamicDependency("Min`1", typeof(Enumerable))]
public static Task<T> MinAsync<T>(this IEntityQuery<T> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
cancellationToken CancellationToken?

Returns

Task<T>

Type Parameters

T

MinAsync<T, U>(IEntityQuery<T>, Expression<Func<T, U>>, CancellationToken?)

[DynamicDependency("Min`2", typeof(Enumerable))]
public static Task<U> MinAsync<T, U>(this IEntityQuery<T> source, Expression<Func<T, U>> projection, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, U>>
cancellationToken CancellationToken?

Returns

Task<U>

Type Parameters

T
U

Min<T>(IEntityQuery<T>)

[DynamicDependency("Min`1", typeof(Enumerable))]
public static T Min<T>(this IEntityQuery<T> source)

Parameters

source IEntityQuery<T>

Returns

T

Type Parameters

T

Min<T, U>(IEntityQuery<T>, Expression<Func<T, U>>)

[DynamicDependency("Min`2", typeof(Enumerable))]
public static U Min<T, U>(this IEntityQuery<T> source, Expression<Func<T, U>> projection)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, U>>

Returns

U

Type Parameters

T
U

OrderByDescending<T>(IEntityQuery<T>, PropertyInfo)

[DynamicDependency("OrderByDescending`2", typeof(Enumerable))]
public static IOrderedEntityQuery<T> OrderByDescending<T>(this IEntityQuery<T> source, PropertyInfo metadata) where T : IEntity

Parameters

source IEntityQuery<T>
metadata PropertyInfo

Returns

IOrderedEntityQuery<T>

Type Parameters

T

OrderByDescending<TSource, TKey>(IEntityQuery<TSource>, Expression<Func<TSource, TKey>>)

[DynamicDependency("OrderByDescending`2", typeof(Enumerable))]
public static IOrderedEntityQuery<TSource> OrderByDescending<TSource, TKey>(this IEntityQuery<TSource> source, Expression<Func<TSource, TKey>> keySelector)

Parameters

source IEntityQuery<TSource>
keySelector Expression<Func<TSource, TKey>>

Returns

IOrderedEntityQuery<TSource>

Type Parameters

TSource
TKey

OrderBy<T>(IEntityQuery<T>, PropertyInfo)

[DynamicDependency("OrderBy`2", typeof(Enumerable))]
public static IOrderedEntityQuery<T> OrderBy<T>(this IEntityQuery<T> source, PropertyInfo metadata) where T : IEntity

Parameters

source IEntityQuery<T>
metadata PropertyInfo

Returns

IOrderedEntityQuery<T>

Type Parameters

T

OrderBy<T>(IEntityQuery<T>, PropertyInfo, bool)

[DynamicDependency("OrderBy`2", typeof(Enumerable))]
[DynamicDependency("OrderByDescending`2", typeof(Enumerable))]
public static IOrderedEntityQuery<T> OrderBy<T>(this IEntityQuery<T> source, PropertyInfo metadata, bool ascending) where T : IEntity

Parameters

source IEntityQuery<T>
metadata PropertyInfo
ascending bool

Returns

IOrderedEntityQuery<T>

Type Parameters

T

OrderBy<TSource, TKey>(IEntityQuery<TSource>, Expression<Func<TSource, TKey>>)

[DynamicDependency("OrderBy`2", typeof(Enumerable))]
public static IOrderedEntityQuery<TSource> OrderBy<TSource, TKey>(this IEntityQuery<TSource> source, Expression<Func<TSource, TKey>> keySelector)

Parameters

source IEntityQuery<TSource>
keySelector Expression<Func<TSource, TKey>>

Returns

IOrderedEntityQuery<TSource>

Type Parameters

TSource
TKey

SelectIDPairs<T>(IEntityQuery<T>, RelationshipInfo)

public static IEntityQuery<Tuple<Guid, Guid>> SelectIDPairs<T>(this IEntityQuery<T> source, RelationshipInfo metadata) where T : IEntity

Parameters

source IEntityQuery<T>
metadata RelationshipInfo

Returns

IEntityQuery<Tuple<Guid, Guid>>

Type Parameters

T

SelectMany<TSource, TResult>(IEntityQuery<TSource>, Expression<Func<TSource, int, IEntitySet<TResult>>>)

[DynamicDependency("SelectMany`2", typeof(Enumerable))]
public static IEntityQuery<TResult> SelectMany<TSource, TResult>(this IEntityQuery<TSource> source, Expression<Func<TSource, int, IEntitySet<TResult>>> selector) where TResult : IEntity

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, int, IEntitySet<TResult>>>

Returns

IEntityQuery<TResult>

Type Parameters

TSource
TResult

SelectMany<TSource, TResult>(IEntityQuery<TSource>, Expression<Func<TSource, IEntitySet<TResult>>>)

[DynamicDependency("SelectMany`2", typeof(Enumerable))]
public static IEntityQuery<TResult> SelectMany<TSource, TResult>(this IEntityQuery<TSource> source, Expression<Func<TSource, IEntitySet<TResult>>> selector) where TResult : IEntity

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, IEntitySet<TResult>>>

Returns

IEntityQuery<TResult>

Type Parameters

TSource
TResult

SelectMany<TSource, TCollection, TResult>(IEntityQuery<TSource>, Expression<Func<TSource, int, IEntitySet<TCollection>>>, Expression<Func<TSource, TCollection, TResult>>)

[DynamicDependency("SelectMany`3", typeof(Enumerable))]
public static IEntityQuery<TResult> SelectMany<TSource, TCollection, TResult>(this IEntityQuery<TSource> source, Expression<Func<TSource, int, IEntitySet<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector) where TCollection : IEntity

Parameters

source IEntityQuery<TSource>
collectionSelector Expression<Func<TSource, int, IEntitySet<TCollection>>>
resultSelector Expression<Func<TSource, TCollection, TResult>>

Returns

IEntityQuery<TResult>

Type Parameters

TSource
TCollection
TResult

SelectMany<TSource, TCollection, TResult>(IEntityQuery<TSource>, Expression<Func<TSource, IEntitySet<TCollection>>>, Expression<Func<TSource, TCollection, TResult>>)

[DynamicDependency("SelectMany`3", typeof(Enumerable))]
public static IEntityQuery<TResult> SelectMany<TSource, TCollection, TResult>(this IEntityQuery<TSource> source, Expression<Func<TSource, IEntitySet<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector) where TCollection : IEntity

Parameters

source IEntityQuery<TSource>
collectionSelector Expression<Func<TSource, IEntitySet<TCollection>>>
resultSelector Expression<Func<TSource, TCollection, TResult>>

Returns

IEntityQuery<TResult>

Type Parameters

TSource
TCollection
TResult

Select<T>(IEntityQuery<T>, RelationshipInfo)

Call Select() or SelectMany(), according to RelationshipInfo metadata.

public static IEntityQuery<IEntity> Select<T>(this IEntityQuery<T> source, RelationshipInfo metadata) where T : IEntity

Parameters

source IEntityQuery<T>
metadata RelationshipInfo

Returns

IEntityQuery<IEntity>

Type Parameters

T

Select<T>(IEntityQuery<T>, RelationshipPath)

Recursively call Select() and SelectMany(), following a RelationshipPath.

public static IEntityQuery<IEntity> Select<T>(this IEntityQuery<T> source, RelationshipPath path) where T : IEntity

Parameters

source IEntityQuery<T>
path RelationshipPath

Returns

IEntityQuery<IEntity>

Type Parameters

T

Select<TSource, TResult>(IEntityQuery<TSource>, Expression<Func<TSource, int, TResult>>)

[DynamicDependency("Select`2", typeof(Enumerable))]
public static IEntityQuery<TResult> Select<TSource, TResult>(this IEntityQuery<TSource> source, Expression<Func<TSource, int, TResult>> selector) where TResult : IEntity

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, int, TResult>>

Returns

IEntityQuery<TResult>

Type Parameters

TSource
TResult

Select<TSource, TResult>(IEntityQuery<TSource>, Expression<Func<TSource, TResult>>)

[DynamicDependency("Select`2", typeof(Enumerable))]
public static IEntityQuery<TResult> Select<TSource, TResult>(this IEntityQuery<TSource> source, Expression<Func<TSource, TResult>> selector)

Parameters

source IEntityQuery<TSource>
selector Expression<Func<TSource, TResult>>

Returns

IEntityQuery<TResult>

Type Parameters

TSource
TResult

Select<T, U>(IEntityQuery<T>, AttributeInfo)

public static IEntityQuery<U> Select<T, U>(this IEntityQuery<T> source, AttributeInfo metadata)

Parameters

source IEntityQuery<T>
metadata AttributeInfo

Returns

IEntityQuery<U>

Type Parameters

T
U

Select<T, U>(IEntityQuery<T>, RelationshipInfo)

Call Select() or SelectMany(), according to RelationshipInfo metadata.

public static IEntityQuery<U> Select<T, U>(this IEntityQuery<T> source, RelationshipInfo metadata) where U : IEntity

Parameters

source IEntityQuery<T>
metadata RelationshipInfo

Returns

IEntityQuery<U>

Type Parameters

T
U

SingleAsync<T>(IEntityQuery<T>, Expression<Func<T, bool>>, CancellationToken?)

[DynamicDependency("Single`2", typeof(Enumerable))]
public static Task<T> SingleAsync<T>(this IEntityQuery<T> source, Expression<Func<T, bool>> predicate, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
predicate Expression<Func<T, bool>>
cancellationToken CancellationToken?

Returns

Task<T>

Type Parameters

T

SingleAsync<T>(IEntityQuery<T>, CancellationToken?)

[DynamicDependency("Single`1", typeof(Enumerable))]
public static Task<T> SingleAsync<T>(this IEntityQuery<T> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
cancellationToken CancellationToken?

Returns

Task<T>

Type Parameters

T

SingleOrDefaultAsync<T>(IEntityQuery<T>, Expression<Func<T, bool>>, CancellationToken?)

[DynamicDependency("SingleOrDefault`2", typeof(Enumerable))]
public static Task<T?> SingleOrDefaultAsync<T>(this IEntityQuery<T> source, Expression<Func<T, bool>> predicate, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
predicate Expression<Func<T, bool>>
cancellationToken CancellationToken?

Returns

Task<T>

Type Parameters

T

SingleOrDefaultAsync<T>(IEntityQuery<T>, CancellationToken?)

[DynamicDependency("SingleOrDefault`1", typeof(Enumerable))]
public static Task<T?> SingleOrDefaultAsync<T>(this IEntityQuery<T> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
cancellationToken CancellationToken?

Returns

Task<T>

Type Parameters

T

SingleOrDefault<T>(IEntityQuery<T>)

[DynamicDependency("SingleOrDefault`1", typeof(Enumerable))]
public static T? SingleOrDefault<T>(this IEntityQuery<T> source)

Parameters

source IEntityQuery<T>

Returns

T

Type Parameters

T

SingleOrDefault<T>(IEntityQuery<T>, Expression<Func<T, bool>>)

[DynamicDependency("SingleOrDefault`2", typeof(Enumerable))]
public static T? SingleOrDefault<T>(this IEntityQuery<T> source, Expression<Func<T, bool>> predicate)

Parameters

source IEntityQuery<T>
predicate Expression<Func<T, bool>>

Returns

T

Type Parameters

T

Single<T>(IEntityQuery<T>)

[DynamicDependency("Single`1", typeof(Enumerable))]
public static T Single<T>(this IEntityQuery<T> source)

Parameters

source IEntityQuery<T>

Returns

T

Type Parameters

T

Single<T>(IEntityQuery<T>, Expression<Func<T, bool>>)

[DynamicDependency("Single`2", typeof(Enumerable))]
public static T Single<T>(this IEntityQuery<T> source, Expression<Func<T, bool>> predicate)

Parameters

source IEntityQuery<T>
predicate Expression<Func<T, bool>>

Returns

T

Type Parameters

T

Skip<TSource>(IEntityQuery<TSource>, int)

[DynamicDependency("Skip`1", typeof(Enumerable))]
public static IEntityQuery<TSource> Skip<TSource>(this IEntityQuery<TSource> source, int count)

Parameters

source IEntityQuery<TSource>
count int

Returns

IEntityQuery<TSource>

Type Parameters

TSource

Sum(IEntityQuery<decimal>)

[DynamicDependency("Sum`1", typeof(Enumerable))]
public static decimal Sum(this IEntityQuery<decimal> source)

Parameters

source IEntityQuery<decimal>

Returns

decimal

Sum(IEntityQuery<double>)

[DynamicDependency("Sum`1", typeof(Enumerable))]
public static double Sum(this IEntityQuery<double> source)

Parameters

source IEntityQuery<double>

Returns

double

Sum(IEntityQuery<int>)

[DynamicDependency("Sum`1", typeof(Enumerable))]
public static int Sum(this IEntityQuery<int> source)

Parameters

source IEntityQuery<int>

Returns

int

Sum(IEntityQuery<long>)

[DynamicDependency("Sum`1", typeof(Enumerable))]
public static long Sum(this IEntityQuery<long> source)

Parameters

source IEntityQuery<long>

Returns

long

Sum(IEntityQuery<float>)

[DynamicDependency("Sum`1", typeof(Enumerable))]
public static float Sum(this IEntityQuery<float> source)

Parameters

source IEntityQuery<float>

Returns

float

SumAsync(IEntityQuery<decimal>, CancellationToken?)

[DynamicDependency("Sum`1", typeof(Enumerable))]
public static Task<decimal> SumAsync(this IEntityQuery<decimal> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<decimal>
cancellationToken CancellationToken?

Returns

Task<decimal>

SumAsync(IEntityQuery<double>, CancellationToken?)

[DynamicDependency("Sum`1", typeof(Enumerable))]
public static Task<double> SumAsync(this IEntityQuery<double> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<double>
cancellationToken CancellationToken?

Returns

Task<double>

SumAsync(IEntityQuery<int>, CancellationToken?)

[DynamicDependency("Sum`1", typeof(Enumerable))]
public static Task<int> SumAsync(this IEntityQuery<int> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<int>
cancellationToken CancellationToken?

Returns

Task<int>

SumAsync(IEntityQuery<long>, CancellationToken?)

[DynamicDependency("Sum`1", typeof(Enumerable))]
public static Task<long> SumAsync(this IEntityQuery<long> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<long>
cancellationToken CancellationToken?

Returns

Task<long>

SumAsync(IEntityQuery<float>, CancellationToken?)

[DynamicDependency("Sum`1", typeof(Enumerable))]
public static Task<float> SumAsync(this IEntityQuery<float> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<float>
cancellationToken CancellationToken?

Returns

Task<float>

SumAsync<T>(IEntityQuery<T>, Expression<Func<T, decimal>>, CancellationToken?)

[DynamicDependency("Sum`2", typeof(Enumerable))]
public static Task<decimal> SumAsync<T>(this IEntityQuery<T> source, Expression<Func<T, decimal>> projection, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, decimal>>
cancellationToken CancellationToken?

Returns

Task<decimal>

Type Parameters

T

SumAsync<T>(IEntityQuery<T>, Expression<Func<T, double>>, CancellationToken?)

[DynamicDependency("Sum`2", typeof(Enumerable))]
public static Task<double> SumAsync<T>(this IEntityQuery<T> source, Expression<Func<T, double>> projection, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, double>>
cancellationToken CancellationToken?

Returns

Task<double>

Type Parameters

T

SumAsync<T>(IEntityQuery<T>, Expression<Func<T, int>>, CancellationToken?)

[DynamicDependency("Sum`2", typeof(Enumerable))]
public static Task<int> SumAsync<T>(this IEntityQuery<T> source, Expression<Func<T, int>> projection, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, int>>
cancellationToken CancellationToken?

Returns

Task<int>

Type Parameters

T

SumAsync<T>(IEntityQuery<T>, Expression<Func<T, long>>, CancellationToken?)

[DynamicDependency("Sum`2", typeof(Enumerable))]
public static Task<long> SumAsync<T>(this IEntityQuery<T> source, Expression<Func<T, long>> projection, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, long>>
cancellationToken CancellationToken?

Returns

Task<long>

Type Parameters

T

SumAsync<T>(IEntityQuery<T>, Expression<Func<T, float>>, CancellationToken?)

[DynamicDependency("Sum`2", typeof(Enumerable))]
public static Task<float> SumAsync<T>(this IEntityQuery<T> source, Expression<Func<T, float>> projection, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, float>>
cancellationToken CancellationToken?

Returns

Task<float>

Type Parameters

T

Sum<T>(IEntityQuery<T>, Expression<Func<T, decimal>>)

[DynamicDependency("Sum`2", typeof(Enumerable))]
public static decimal Sum<T>(this IEntityQuery<T> source, Expression<Func<T, decimal>> projection)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, decimal>>

Returns

decimal

Type Parameters

T

Sum<T>(IEntityQuery<T>, Expression<Func<T, double>>)

[DynamicDependency("Sum`2", typeof(Enumerable))]
public static double Sum<T>(this IEntityQuery<T> source, Expression<Func<T, double>> projection)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, double>>

Returns

double

Type Parameters

T

Sum<T>(IEntityQuery<T>, Expression<Func<T, int>>)

[DynamicDependency("Sum`2", typeof(Enumerable))]
public static int Sum<T>(this IEntityQuery<T> source, Expression<Func<T, int>> projection)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, int>>

Returns

int

Type Parameters

T

Sum<T>(IEntityQuery<T>, Expression<Func<T, long>>)

[DynamicDependency("Sum`2", typeof(Enumerable))]
public static long Sum<T>(this IEntityQuery<T> source, Expression<Func<T, long>> projection)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, long>>

Returns

long

Type Parameters

T

Sum<T>(IEntityQuery<T>, Expression<Func<T, float>>)

[DynamicDependency("Sum`2", typeof(Enumerable))]
public static float Sum<T>(this IEntityQuery<T> source, Expression<Func<T, float>> projection)

Parameters

source IEntityQuery<T>
projection Expression<Func<T, float>>

Returns

float

Type Parameters

T

Take<TSource>(IEntityQuery<TSource>, int)

[DynamicDependency("Take`1", typeof(Enumerable))]
public static IEntityQuery<TSource> Take<TSource>(this IEntityQuery<TSource> source, int count)

Parameters

source IEntityQuery<TSource>
count int

Returns

IEntityQuery<TSource>

Type Parameters

TSource

ThenByDescending<T>(IOrderedEntityQuery<T>, PropertyInfo)

[DynamicDependency("ThenByDescending`2", typeof(Enumerable))]
public static IOrderedEntityQuery<T> ThenByDescending<T>(this IOrderedEntityQuery<T> source, PropertyInfo metadata) where T : IEntity

Parameters

source IOrderedEntityQuery<T>
metadata PropertyInfo

Returns

IOrderedEntityQuery<T>

Type Parameters

T

ThenByDescending<TSource, TKey>(IOrderedEntityQuery<TSource>, Expression<Func<TSource, TKey>>)

[DynamicDependency("ThenByDescending`2", typeof(Enumerable))]
public static IOrderedEntityQuery<TSource> ThenByDescending<TSource, TKey>(this IOrderedEntityQuery<TSource> source, Expression<Func<TSource, TKey>> keySelector)

Parameters

source IOrderedEntityQuery<TSource>
keySelector Expression<Func<TSource, TKey>>

Returns

IOrderedEntityQuery<TSource>

Type Parameters

TSource
TKey

ThenBy<T>(IOrderedEntityQuery<T>, PropertyInfo)

[DynamicDependency("ThenBy`2", typeof(Enumerable))]
public static IOrderedEntityQuery<T> ThenBy<T>(this IOrderedEntityQuery<T> source, PropertyInfo metadata) where T : IEntity

Parameters

source IOrderedEntityQuery<T>
metadata PropertyInfo

Returns

IOrderedEntityQuery<T>

Type Parameters

T

ThenBy<T>(IOrderedEntityQuery<T>, PropertyInfo, bool)

[DynamicDependency("ThenBy`2", typeof(Enumerable))]
[DynamicDependency("ThenByDescending`2", typeof(Enumerable))]
public static IOrderedEntityQuery<T> ThenBy<T>(this IOrderedEntityQuery<T> source, PropertyInfo metadata, bool ascending) where T : IEntity

Parameters

source IOrderedEntityQuery<T>
metadata PropertyInfo
ascending bool

Returns

IOrderedEntityQuery<T>

Type Parameters

T

ThenBy<TSource, TKey>(IOrderedEntityQuery<TSource>, Expression<Func<TSource, TKey>>)

[DynamicDependency("ThenBy`2", typeof(Enumerable))]
public static IOrderedEntityQuery<TSource> ThenBy<TSource, TKey>(this IOrderedEntityQuery<TSource> source, Expression<Func<TSource, TKey>> keySelector)

Parameters

source IOrderedEntityQuery<TSource>
keySelector Expression<Func<TSource, TKey>>

Returns

IOrderedEntityQuery<TSource>

Type Parameters

TSource
TKey

ThenInclude<T, U>(IIncludedEntityQuery<T, U>, RelationshipInfo, bool)

Specifies additional related entities to include in the query results using a RelationshipInfo. Equivalent to calling ThenInclude(e => e.Relationship).

public static IEntityQuery<T> ThenInclude<T, U>(this IIncludedEntityQuery<T, U> source, RelationshipInfo metadata, bool throwIfUnauthorised = false) where T : IEntity where U : IEntity

Parameters

source IIncludedEntityQuery<T, U>

The source included query.

metadata RelationshipInfo

The relationship metadata.

throwIfUnauthorised bool

If true, throws SecurityException when the principal lacks read access to the related entity type. If false (default), the include is silently skipped.

Returns

IEntityQuery<T>

An entity query.

Type Parameters

T

The root entity type of the query.

U

The previously included entity type.

ThenInclude<T, U>(IIncludedEntityQuery<T, U>, RelationshipPath, bool)

Specifies additional related entities to include in the query results using a RelationshipPath. Equivalent to calling ThenInclude() for each relationship in the path.

public static IEntityQuery<T> ThenInclude<T, U>(this IIncludedEntityQuery<T, U> source, RelationshipPath path, bool throwIfUnauthorised = false) where T : IEntity where U : IEntity

Parameters

source IIncludedEntityQuery<T, U>

The source included query.

path RelationshipPath

The relationship path.

throwIfUnauthorised bool

If true, throws SecurityException when the principal lacks read access to any entity type in the path. If false (default), the include stops at the first unauthorised segment.

Returns

IEntityQuery<T>

An entity query.

Type Parameters

T

The root entity type of the query.

U

The previously included entity type.

ThenInclude<T, U, V>(IIncludedEntityQuery<T, U>, Expression<Func<U, IEntitySet<V>>>, bool)

Specifies an additional related collection to include in the query results after an initial Include.

public static IIncludedEntityQuery<T, V> ThenInclude<T, U, V>(this IIncludedEntityQuery<T, U> source, Expression<Func<U, IEntitySet<V>>> selector, bool throwIfUnauthorised = false) where T : IEntity where U : IEntity where V : IEntity

Parameters

source IIncludedEntityQuery<T, U>

The source included query.

selector Expression<Func<U, IEntitySet<V>>>

An expression selecting the related entity collection property.

throwIfUnauthorised bool

If true, throws SecurityException when the principal lacks read access to the related entity type. If false (default), the include is silently skipped.

Returns

IIncludedEntityQuery<T, V>

An included entity query.

Type Parameters

T

The root entity type of the query.

U

The previously included entity type.

V

The related entity type to include next.

ThenInclude<T, U, V>(IIncludedEntityQuery<T, U>, Expression<Func<U, V?>>, bool)

Specifies an additional related entity to include in the query results after an initial Include.

public static IIncludedEntityQuery<T, V> ThenInclude<T, U, V>(this IIncludedEntityQuery<T, U> source, Expression<Func<U, V?>> selector, bool throwIfUnauthorised = false) where T : IEntity where U : IEntity where V : IEntity

Parameters

source IIncludedEntityQuery<T, U>

The source included query.

selector Expression<Func<U, V>>

An expression selecting the related entity property.

throwIfUnauthorised bool

If true, throws SecurityException when the principal lacks read access to the related entity type. If false (default), the include is silently skipped.

Returns

IIncludedEntityQuery<T, V>

An included entity query.

Type Parameters

T

The root entity type of the query.

U

The previously included entity type.

V

The related entity type to include next.

ToArrayAsync<T>(IEntityQuery<T>, CancellationToken?)

public static Task<T[]> ToArrayAsync<T>(this IEntityQuery<T> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
cancellationToken CancellationToken?

Returns

Task<T[]>

Type Parameters

T

ToArray<T>(IEntityQuery<T>)

public static T[] ToArray<T>(this IEntityQuery<T> source)

Parameters

source IEntityQuery<T>

Returns

T[]

Type Parameters

T

ToDictionaryAsync<T, TKey>(IEntityQuery<T>, Func<T, TKey>, IEqualityComparer<TKey>, CancellationToken?)

public static Task<Dictionary<TKey, T>> ToDictionaryAsync<T, TKey>(this IEntityQuery<T> source, Func<T, TKey> keySelector, IEqualityComparer<TKey> comparer, CancellationToken? cancellationToken = null) where TKey : notnull

Parameters

source IEntityQuery<T>
keySelector Func<T, TKey>
comparer IEqualityComparer<TKey>
cancellationToken CancellationToken?

Returns

Task<Dictionary<TKey, T>>

Type Parameters

T
TKey

ToDictionaryAsync<T, TKey>(IEntityQuery<T>, Func<T, TKey>, CancellationToken?)

public static Task<Dictionary<TKey, T>> ToDictionaryAsync<T, TKey>(this IEntityQuery<T> source, Func<T, TKey> keySelector, CancellationToken? cancellationToken = null) where TKey : notnull

Parameters

source IEntityQuery<T>
keySelector Func<T, TKey>
cancellationToken CancellationToken?

Returns

Task<Dictionary<TKey, T>>

Type Parameters

T
TKey

ToDictionaryAsync<T, TKey, TElement>(IEntityQuery<T>, Func<T, TKey>, Func<T, TElement>, IEqualityComparer<TKey>, CancellationToken?)

public static Task<Dictionary<TKey, TElement>> ToDictionaryAsync<T, TKey, TElement>(this IEntityQuery<T> source, Func<T, TKey> keySelector, Func<T, TElement> elementSelector, IEqualityComparer<TKey> comparer, CancellationToken? cancellationToken = null) where TKey : notnull

Parameters

source IEntityQuery<T>
keySelector Func<T, TKey>
elementSelector Func<T, TElement>
comparer IEqualityComparer<TKey>
cancellationToken CancellationToken?

Returns

Task<Dictionary<TKey, TElement>>

Type Parameters

T
TKey
TElement

ToDictionaryAsync<T, TKey, TElement>(IEntityQuery<T>, Func<T, TKey>, Func<T, TElement>, CancellationToken?)

public static Task<Dictionary<TKey, TElement>> ToDictionaryAsync<T, TKey, TElement>(this IEntityQuery<T> source, Func<T, TKey> keySelector, Func<T, TElement> elementSelector, CancellationToken? cancellationToken = null) where TKey : notnull

Parameters

source IEntityQuery<T>
keySelector Func<T, TKey>
elementSelector Func<T, TElement>
cancellationToken CancellationToken?

Returns

Task<Dictionary<TKey, TElement>>

Type Parameters

T
TKey
TElement

ToEntityQuery(IQueryable)

public static IEntityQuery ToEntityQuery(this IQueryable source)

Parameters

source IQueryable

Returns

IEntityQuery

ToEntityQuery<T>(IQueryable<T>)

public static IEntityQuery<T> ToEntityQuery<T>(this IQueryable<T> source)

Parameters

source IQueryable<T>

Returns

IEntityQuery<T>

Type Parameters

T

ToHashSetAsync<T>(IEntityQuery<T>, CancellationToken?)

public static Task<HashSet<T>> ToHashSetAsync<T>(this IEntityQuery<T> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
cancellationToken CancellationToken?

Returns

Task<HashSet<T>>

Type Parameters

T

ToHashSet<T>(IEntityQuery<T>)

public static HashSet<T> ToHashSet<T>(this IEntityQuery<T> source)

Parameters

source IEntityQuery<T>

Returns

HashSet<T>

Type Parameters

T

ToListAsync<T>(IEntityQuery<T>, CancellationToken?)

public static Task<List<T>> ToListAsync<T>(this IEntityQuery<T> source, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
cancellationToken CancellationToken?

Returns

Task<List<T>>

Type Parameters

T

ToList<T>(IEntityQuery<T>)

public static List<T> ToList<T>(this IEntityQuery<T> source)

Parameters

source IEntityQuery<T>

Returns

List<T>

Type Parameters

T

ToLookupAsync<T, TKey>(IEntityQuery<T>, Func<T, TKey>, IEqualityComparer<TKey>, CancellationToken?)

public static Task<ILookup<TKey, T>> ToLookupAsync<T, TKey>(this IEntityQuery<T> source, Func<T, TKey> keySelector, IEqualityComparer<TKey> comparer, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
keySelector Func<T, TKey>
comparer IEqualityComparer<TKey>
cancellationToken CancellationToken?

Returns

Task<ILookup<TKey, T>>

Type Parameters

T
TKey

ToLookupAsync<T, TKey>(IEntityQuery<T>, Func<T, TKey>, CancellationToken?)

public static Task<ILookup<TKey, T>> ToLookupAsync<T, TKey>(this IEntityQuery<T> source, Func<T, TKey> keySelector, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
keySelector Func<T, TKey>
cancellationToken CancellationToken?

Returns

Task<ILookup<TKey, T>>

Type Parameters

T
TKey

ToLookupAsync<T, TKey, TElement>(IEntityQuery<T>, Func<T, TKey>, Func<T, TElement>, IEqualityComparer<TKey>, CancellationToken?)

public static Task<ILookup<TKey, TElement>> ToLookupAsync<T, TKey, TElement>(this IEntityQuery<T> source, Func<T, TKey> keySelector, Func<T, TElement> elementSelector, IEqualityComparer<TKey> comparer, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
keySelector Func<T, TKey>
elementSelector Func<T, TElement>
comparer IEqualityComparer<TKey>
cancellationToken CancellationToken?

Returns

Task<ILookup<TKey, TElement>>

Type Parameters

T
TKey
TElement

ToLookupAsync<T, TKey, TElement>(IEntityQuery<T>, Func<T, TKey>, Func<T, TElement>, CancellationToken?)

public static Task<ILookup<TKey, TElement>> ToLookupAsync<T, TKey, TElement>(this IEntityQuery<T> source, Func<T, TKey> keySelector, Func<T, TElement> elementSelector, CancellationToken? cancellationToken = null)

Parameters

source IEntityQuery<T>
keySelector Func<T, TKey>
elementSelector Func<T, TElement>
cancellationToken CancellationToken?

Returns

Task<ILookup<TKey, TElement>>

Type Parameters

T
TKey
TElement

ToQueryable(IEntityQuery)

public static IQueryable ToQueryable(this IEntityQuery source)

Parameters

source IEntityQuery

Returns

IQueryable

ToQueryable<T>(IEntityQuery<T>)

public static IQueryable<T> ToQueryable<T>(this IEntityQuery<T> source)

Parameters

source IEntityQuery<T>

Returns

IQueryable<T>

Type Parameters

T

Union<TSource>(IEntityQuery<TSource>, IEntityQuery<TSource>)

[DynamicDependency("Union`1", typeof(Enumerable))]
public static IEntityQuery<TSource> Union<TSource>(this IEntityQuery<TSource> source1, IEntityQuery<TSource> source2)

Parameters

source1 IEntityQuery<TSource>
source2 IEntityQuery<TSource>

Returns

IEntityQuery<TSource>

Type Parameters

TSource

Where<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, bool>>)

[DynamicDependency("Where`1", typeof(Enumerable))]
public static IEntityQuery<TSource> Where<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, bool>> predicate)

Parameters

source IEntityQuery<TSource>
predicate Expression<Func<TSource, bool>>

Returns

IEntityQuery<TSource>

Type Parameters

TSource

Where<TSource>(IEntityQuery<TSource>, Expression<Func<TSource, int, bool>>)

[DynamicDependency("Where`1", typeof(Enumerable))]
public static IEntityQuery<TSource> Where<TSource>(this IEntityQuery<TSource> source, Expression<Func<TSource, int, bool>> predicate)

Parameters

source IEntityQuery<TSource>
predicate Expression<Func<TSource, int, bool>>

Returns

IEntityQuery<TSource>

Type Parameters

TSource

WithReadUncommitted<T>(IEntityQuery<T>)

If executing on a relational database, allow dirty reads by eschewing table locks.

public static IEntityQuery<T> WithReadUncommitted<T>(this IEntityQuery<T> source) where T : IEntity

Parameters

source IEntityQuery<T>

Returns

IEntityQuery<T>

Type Parameters

T