Class EntityQueryExtensions
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
sourceIEntityQuery<TSource>predicateExpression<Func<TSource, bool>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<TSource>predicateExpression<Func<TSource, bool>>
Returns
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
sourceIEntityQuery<TSource>predicateExpression<Func<TSource, bool>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<TSource>cancellationTokenCancellationToken?
Returns
Type Parameters
TSource
Any<TSource>(IEntityQuery<TSource>)
[DynamicDependency("Any`1", typeof(Enumerable))]
public static bool Any<TSource>(this IEntityQuery<TSource> source)
Parameters
sourceIEntityQuery<TSource>
Returns
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
sourceIEntityQuery<TSource>predicateExpression<Func<TSource, bool>>
Returns
Type Parameters
TSource
AsReadOperation(IEntityQuery, TranslationPolicy?)
public static IOpGenerator AsReadOperation(this IEntityQuery target, TranslationPolicy? policy = null)
Parameters
targetIEntityQuerypolicyTranslationPolicy
Returns
AsReadOperation<T>(IEntityQuery<T>, TranslationPolicy?)
public static IOpGenerator<T> AsReadOperation<T>(this IEntityQuery<T> target, TranslationPolicy? policy = null)
Parameters
targetIEntityQuery<T>policyTranslationPolicy
Returns
- IOpGenerator<T>
Type Parameters
T
Average(IEntityQuery<decimal>)
[DynamicDependency("Average", typeof(Enumerable))]
public static decimal Average(this IEntityQuery<decimal> source)
Parameters
sourceIEntityQuery<decimal>
Returns
Average(IEntityQuery<double>)
[DynamicDependency("Average", typeof(Enumerable))]
public static double Average(this IEntityQuery<double> source)
Parameters
sourceIEntityQuery<double>
Returns
Average(IEntityQuery<int>)
[DynamicDependency("Average", typeof(Enumerable))]
public static double Average(this IEntityQuery<int> source)
Parameters
sourceIEntityQuery<int>
Returns
Average(IEntityQuery<long>)
[DynamicDependency("Average", typeof(Enumerable))]
public static double Average(this IEntityQuery<long> source)
Parameters
sourceIEntityQuery<long>
Returns
Average(IEntityQuery<float>)
[DynamicDependency("Average", typeof(Enumerable))]
public static float Average(this IEntityQuery<float> source)
Parameters
sourceIEntityQuery<float>
Returns
AverageAsync(IEntityQuery<decimal>, CancellationToken?)
[DynamicDependency("Average", typeof(Enumerable))]
public static Task<decimal> AverageAsync(this IEntityQuery<decimal> source, CancellationToken? cancellationToken = null)
Parameters
sourceIEntityQuery<decimal>cancellationTokenCancellationToken?
Returns
AverageAsync(IEntityQuery<double>, CancellationToken?)
[DynamicDependency("Average", typeof(Enumerable))]
public static Task<double> AverageAsync(this IEntityQuery<double> source, CancellationToken? cancellationToken = null)
Parameters
sourceIEntityQuery<double>cancellationTokenCancellationToken?
Returns
AverageAsync(IEntityQuery<int>, CancellationToken?)
[DynamicDependency("Average", typeof(Enumerable))]
public static Task<double> AverageAsync(this IEntityQuery<int> source, CancellationToken? cancellationToken = null)
Parameters
sourceIEntityQuery<int>cancellationTokenCancellationToken?
Returns
AverageAsync(IEntityQuery<long>, CancellationToken?)
[DynamicDependency("Average", typeof(Enumerable))]
public static Task<double> AverageAsync(this IEntityQuery<long> source, CancellationToken? cancellationToken = null)
Parameters
sourceIEntityQuery<long>cancellationTokenCancellationToken?
Returns
AverageAsync(IEntityQuery<float>, CancellationToken?)
[DynamicDependency("Average", typeof(Enumerable))]
public static Task<float> AverageAsync(this IEntityQuery<float> source, CancellationToken? cancellationToken = null)
Parameters
sourceIEntityQuery<float>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, decimal>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, double>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, int>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, long>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, float>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, decimal>>
Returns
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, double>>
Returns
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, int>>
Returns
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, long>>
Returns
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, float>>
Returns
Type Parameters
TSource
Cast<TResult>(IEntityQuery)
[DynamicDependency("Cast`1", typeof(Enumerable))]
public static IEntityQuery<TResult> Cast<TResult>(this IEntityQuery source)
Parameters
sourceIEntityQuery
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
sourceIEntityQuery<T>contextIEntityContext
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
source1IEntityQuery<TSource>source2IEntityQuery<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
sourceIEntityQuery<TSource>predicateExpression<Func<TSource, bool>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<TSource>cancellationTokenCancellationToken?
Returns
Type Parameters
TSource
Count<TSource>(IEntityQuery<TSource>)
[DynamicDependency("Count`1", typeof(Enumerable))]
public static int Count<TSource>(this IEntityQuery<TSource> source)
Parameters
sourceIEntityQuery<TSource>
Returns
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
sourceIEntityQuery<TSource>predicateExpression<Func<TSource, bool>>
Returns
Type Parameters
TSource
Distinct<TSource>(IEntityQuery<TSource>)
[DynamicDependency("Distinct`1", typeof(Enumerable))]
public static IEntityQuery<TSource> Distinct<TSource>(this IEntityQuery<TSource> source)
Parameters
sourceIEntityQuery<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
sourceIEntityQuery<T>indexintcancellationTokenCancellationToken?
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
sourceIEntityQuery<T>indexintcancellationTokenCancellationToken?
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
sourceIEntityQuery<T>indexint
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
sourceIEntityQuery<T>indexint
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
source1IEntityQuery<TSource>source2IEntityQuery<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
sourceIEntityQuery<T>predicateExpression<Func<T, bool>>cancellationTokenCancellationToken?
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
sourceIEntityQuery<T>cancellationTokenCancellationToken?
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
sourceIEntityQuery<T>predicateExpression<Func<T, bool>>cancellationTokenCancellationToken?
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
sourceIEntityQuery<T>cancellationTokenCancellationToken?
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
sourceIEntityQuery<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
sourceIEntityQuery<T>predicateExpression<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
sourceIEntityQuery<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
sourceIEntityQuery<T>predicateExpression<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
sourceIEntityQuery<T>cancellationTokenCancellationToken?
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
sourceIEntityQuery<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
sourceIEntityQuery<T>The source query.
pathsIEnumerable<RelationshipPath>The relationship paths.
throwIfUnauthorisedboolIf 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
TThe 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
sourceIEntityQuery<T>The source query.
metadataRelationshipInfoThe relationship metadata.
throwIfUnauthorisedboolIf 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
TThe 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
sourceIEntityQuery<T>The source query.
pathRelationshipPathThe relationship path.
throwIfUnauthorisedboolIf 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
TThe 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
sourceIEntityQuery<T>The source query.
selectorExpression<Func<T, IEntitySet<U>>>An expression selecting the related entity collection property.
throwIfUnauthorisedboolIf 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
TThe entity type of the query.
UThe 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
sourceIEntityQuery<T>The source query.
selectorExpression<Func<T, U>>An expression selecting the related entity property.
throwIfUnauthorisedboolIf 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
TThe entity type of the query.
UThe 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
source1IEntityQuery<TSource>source2IEntityQuery<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
sourceIEntityQuery<T>cancellationTokenCancellationToken?
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
sourceIEntityQuery<T>projectionExpression<Func<T, U>>cancellationTokenCancellationToken?
Returns
- Task<U>
Type Parameters
TU
Max<T>(IEntityQuery<T>)
[DynamicDependency("Max`1", typeof(Enumerable))]
public static T Max<T>(this IEntityQuery<T> source)
Parameters
sourceIEntityQuery<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
sourceIEntityQuery<T>projectionExpression<Func<T, U>>
Returns
- U
Type Parameters
TU
MinAsync<T>(IEntityQuery<T>, CancellationToken?)
[DynamicDependency("Min`1", typeof(Enumerable))]
public static Task<T> MinAsync<T>(this IEntityQuery<T> source, CancellationToken? cancellationToken = null)
Parameters
sourceIEntityQuery<T>cancellationTokenCancellationToken?
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
sourceIEntityQuery<T>projectionExpression<Func<T, U>>cancellationTokenCancellationToken?
Returns
- Task<U>
Type Parameters
TU
Min<T>(IEntityQuery<T>)
[DynamicDependency("Min`1", typeof(Enumerable))]
public static T Min<T>(this IEntityQuery<T> source)
Parameters
sourceIEntityQuery<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
sourceIEntityQuery<T>projectionExpression<Func<T, U>>
Returns
- U
Type Parameters
TU
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
sourceIEntityQuery<T>metadataPropertyInfo
Returns
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
sourceIEntityQuery<TSource>keySelectorExpression<Func<TSource, TKey>>
Returns
- IOrderedEntityQuery<TSource>
Type Parameters
TSourceTKey
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
sourceIEntityQuery<T>metadataPropertyInfo
Returns
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
sourceIEntityQuery<T>metadataPropertyInfoascendingbool
Returns
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
sourceIEntityQuery<TSource>keySelectorExpression<Func<TSource, TKey>>
Returns
- IOrderedEntityQuery<TSource>
Type Parameters
TSourceTKey
SelectIDPairs<T>(IEntityQuery<T>, RelationshipInfo)
public static IEntityQuery<Tuple<Guid, Guid>> SelectIDPairs<T>(this IEntityQuery<T> source, RelationshipInfo metadata) where T : IEntity
Parameters
sourceIEntityQuery<T>metadataRelationshipInfo
Returns
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, int, IEntitySet<TResult>>>
Returns
- IEntityQuery<TResult>
Type Parameters
TSourceTResult
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, IEntitySet<TResult>>>
Returns
- IEntityQuery<TResult>
Type Parameters
TSourceTResult
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
sourceIEntityQuery<TSource>collectionSelectorExpression<Func<TSource, int, IEntitySet<TCollection>>>resultSelectorExpression<Func<TSource, TCollection, TResult>>
Returns
- IEntityQuery<TResult>
Type Parameters
TSourceTCollectionTResult
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
sourceIEntityQuery<TSource>collectionSelectorExpression<Func<TSource, IEntitySet<TCollection>>>resultSelectorExpression<Func<TSource, TCollection, TResult>>
Returns
- IEntityQuery<TResult>
Type Parameters
TSourceTCollectionTResult
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
sourceIEntityQuery<T>metadataRelationshipInfo
Returns
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
sourceIEntityQuery<T>pathRelationshipPath
Returns
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, int, TResult>>
Returns
- IEntityQuery<TResult>
Type Parameters
TSourceTResult
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
sourceIEntityQuery<TSource>selectorExpression<Func<TSource, TResult>>
Returns
- IEntityQuery<TResult>
Type Parameters
TSourceTResult
Select<T, U>(IEntityQuery<T>, AttributeInfo)
public static IEntityQuery<U> Select<T, U>(this IEntityQuery<T> source, AttributeInfo metadata)
Parameters
sourceIEntityQuery<T>metadataAttributeInfo
Returns
- IEntityQuery<U>
Type Parameters
TU
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
sourceIEntityQuery<T>metadataRelationshipInfo
Returns
- IEntityQuery<U>
Type Parameters
TU
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
sourceIEntityQuery<T>predicateExpression<Func<T, bool>>cancellationTokenCancellationToken?
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
sourceIEntityQuery<T>cancellationTokenCancellationToken?
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
sourceIEntityQuery<T>predicateExpression<Func<T, bool>>cancellationTokenCancellationToken?
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
sourceIEntityQuery<T>cancellationTokenCancellationToken?
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
sourceIEntityQuery<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
sourceIEntityQuery<T>predicateExpression<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
sourceIEntityQuery<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
sourceIEntityQuery<T>predicateExpression<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
sourceIEntityQuery<TSource>countint
Returns
- IEntityQuery<TSource>
Type Parameters
TSource
Sum(IEntityQuery<decimal>)
[DynamicDependency("Sum`1", typeof(Enumerable))]
public static decimal Sum(this IEntityQuery<decimal> source)
Parameters
sourceIEntityQuery<decimal>
Returns
Sum(IEntityQuery<double>)
[DynamicDependency("Sum`1", typeof(Enumerable))]
public static double Sum(this IEntityQuery<double> source)
Parameters
sourceIEntityQuery<double>
Returns
Sum(IEntityQuery<int>)
[DynamicDependency("Sum`1", typeof(Enumerable))]
public static int Sum(this IEntityQuery<int> source)
Parameters
sourceIEntityQuery<int>
Returns
Sum(IEntityQuery<long>)
[DynamicDependency("Sum`1", typeof(Enumerable))]
public static long Sum(this IEntityQuery<long> source)
Parameters
sourceIEntityQuery<long>
Returns
Sum(IEntityQuery<float>)
[DynamicDependency("Sum`1", typeof(Enumerable))]
public static float Sum(this IEntityQuery<float> source)
Parameters
sourceIEntityQuery<float>
Returns
SumAsync(IEntityQuery<decimal>, CancellationToken?)
[DynamicDependency("Sum`1", typeof(Enumerable))]
public static Task<decimal> SumAsync(this IEntityQuery<decimal> source, CancellationToken? cancellationToken = null)
Parameters
sourceIEntityQuery<decimal>cancellationTokenCancellationToken?
Returns
SumAsync(IEntityQuery<double>, CancellationToken?)
[DynamicDependency("Sum`1", typeof(Enumerable))]
public static Task<double> SumAsync(this IEntityQuery<double> source, CancellationToken? cancellationToken = null)
Parameters
sourceIEntityQuery<double>cancellationTokenCancellationToken?
Returns
SumAsync(IEntityQuery<int>, CancellationToken?)
[DynamicDependency("Sum`1", typeof(Enumerable))]
public static Task<int> SumAsync(this IEntityQuery<int> source, CancellationToken? cancellationToken = null)
Parameters
sourceIEntityQuery<int>cancellationTokenCancellationToken?
Returns
SumAsync(IEntityQuery<long>, CancellationToken?)
[DynamicDependency("Sum`1", typeof(Enumerable))]
public static Task<long> SumAsync(this IEntityQuery<long> source, CancellationToken? cancellationToken = null)
Parameters
sourceIEntityQuery<long>cancellationTokenCancellationToken?
Returns
SumAsync(IEntityQuery<float>, CancellationToken?)
[DynamicDependency("Sum`1", typeof(Enumerable))]
public static Task<float> SumAsync(this IEntityQuery<float> source, CancellationToken? cancellationToken = null)
Parameters
sourceIEntityQuery<float>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<T>projectionExpression<Func<T, decimal>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<T>projectionExpression<Func<T, double>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<T>projectionExpression<Func<T, int>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<T>projectionExpression<Func<T, long>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<T>projectionExpression<Func<T, float>>cancellationTokenCancellationToken?
Returns
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
sourceIEntityQuery<T>projectionExpression<Func<T, decimal>>
Returns
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
sourceIEntityQuery<T>projectionExpression<Func<T, double>>
Returns
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
sourceIEntityQuery<T>projectionExpression<Func<T, int>>
Returns
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
sourceIEntityQuery<T>projectionExpression<Func<T, long>>
Returns
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
sourceIEntityQuery<T>projectionExpression<Func<T, float>>
Returns
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
sourceIEntityQuery<TSource>countint
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
sourceIOrderedEntityQuery<T>metadataPropertyInfo
Returns
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
sourceIOrderedEntityQuery<TSource>keySelectorExpression<Func<TSource, TKey>>
Returns
- IOrderedEntityQuery<TSource>
Type Parameters
TSourceTKey
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
sourceIOrderedEntityQuery<T>metadataPropertyInfo
Returns
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
sourceIOrderedEntityQuery<T>metadataPropertyInfoascendingbool
Returns
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
sourceIOrderedEntityQuery<TSource>keySelectorExpression<Func<TSource, TKey>>
Returns
- IOrderedEntityQuery<TSource>
Type Parameters
TSourceTKey
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
sourceIIncludedEntityQuery<T, U>The source included query.
metadataRelationshipInfoThe relationship metadata.
throwIfUnauthorisedboolIf 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
TThe root entity type of the query.
UThe 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
sourceIIncludedEntityQuery<T, U>The source included query.
pathRelationshipPathThe relationship path.
throwIfUnauthorisedboolIf 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
TThe root entity type of the query.
UThe 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
sourceIIncludedEntityQuery<T, U>The source included query.
selectorExpression<Func<U, IEntitySet<V>>>An expression selecting the related entity collection property.
throwIfUnauthorisedboolIf 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
TThe root entity type of the query.
UThe previously included entity type.
VThe 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
sourceIIncludedEntityQuery<T, U>The source included query.
selectorExpression<Func<U, V>>An expression selecting the related entity property.
throwIfUnauthorisedboolIf 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
TThe root entity type of the query.
UThe previously included entity type.
VThe 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
sourceIEntityQuery<T>cancellationTokenCancellationToken?
Returns
- Task<T[]>
Type Parameters
T
ToArray<T>(IEntityQuery<T>)
public static T[] ToArray<T>(this IEntityQuery<T> source)
Parameters
sourceIEntityQuery<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
sourceIEntityQuery<T>keySelectorFunc<T, TKey>comparerIEqualityComparer<TKey>cancellationTokenCancellationToken?
Returns
- Task<Dictionary<TKey, T>>
Type Parameters
TTKey
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
sourceIEntityQuery<T>keySelectorFunc<T, TKey>cancellationTokenCancellationToken?
Returns
- Task<Dictionary<TKey, T>>
Type Parameters
TTKey
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
sourceIEntityQuery<T>keySelectorFunc<T, TKey>elementSelectorFunc<T, TElement>comparerIEqualityComparer<TKey>cancellationTokenCancellationToken?
Returns
- Task<Dictionary<TKey, TElement>>
Type Parameters
TTKeyTElement
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
sourceIEntityQuery<T>keySelectorFunc<T, TKey>elementSelectorFunc<T, TElement>cancellationTokenCancellationToken?
Returns
- Task<Dictionary<TKey, TElement>>
Type Parameters
TTKeyTElement
ToEntityQuery(IQueryable)
public static IEntityQuery ToEntityQuery(this IQueryable source)
Parameters
sourceIQueryable
Returns
ToEntityQuery<T>(IQueryable<T>)
public static IEntityQuery<T> ToEntityQuery<T>(this IQueryable<T> source)
Parameters
sourceIQueryable<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
sourceIEntityQuery<T>cancellationTokenCancellationToken?
Returns
Type Parameters
T
ToHashSet<T>(IEntityQuery<T>)
public static HashSet<T> ToHashSet<T>(this IEntityQuery<T> source)
Parameters
sourceIEntityQuery<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
sourceIEntityQuery<T>cancellationTokenCancellationToken?
Returns
Type Parameters
T
ToList<T>(IEntityQuery<T>)
public static List<T> ToList<T>(this IEntityQuery<T> source)
Parameters
sourceIEntityQuery<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
sourceIEntityQuery<T>keySelectorFunc<T, TKey>comparerIEqualityComparer<TKey>cancellationTokenCancellationToken?
Returns
Type Parameters
TTKey
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
sourceIEntityQuery<T>keySelectorFunc<T, TKey>cancellationTokenCancellationToken?
Returns
Type Parameters
TTKey
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
sourceIEntityQuery<T>keySelectorFunc<T, TKey>elementSelectorFunc<T, TElement>comparerIEqualityComparer<TKey>cancellationTokenCancellationToken?
Returns
Type Parameters
TTKeyTElement
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
sourceIEntityQuery<T>keySelectorFunc<T, TKey>elementSelectorFunc<T, TElement>cancellationTokenCancellationToken?
Returns
Type Parameters
TTKeyTElement
ToQueryable(IEntityQuery)
public static IQueryable ToQueryable(this IEntityQuery source)
Parameters
sourceIEntityQuery
Returns
ToQueryable<T>(IEntityQuery<T>)
public static IQueryable<T> ToQueryable<T>(this IEntityQuery<T> source)
Parameters
sourceIEntityQuery<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
source1IEntityQuery<TSource>source2IEntityQuery<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
sourceIEntityQuery<TSource>predicateExpression<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
sourceIEntityQuery<TSource>predicateExpression<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
sourceIEntityQuery<T>
Returns
- IEntityQuery<T>
Type Parameters
T