Class MongoQueryable
Extension for IMongoQueryable.
public static class MongoQueryable
- Inheritance
-
MongoQueryable
- Inherited Members
Methods
AnyAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, bool>>, CancellationToken)
Determines whether any element of a sequence satisfies a condition.
public static Task<bool> AnyAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence whose elements to test for a condition.
predicateExpression<Func<TSource, bool>>A function to test each element for a condition.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<bool>
true if any elements in the source sequence pass the test in the specified predicate; otherwise, false.
Type Parameters
TSourceThe type of the elements of
source.
AnyAsync<TSource>(IMongoQueryable<TSource>, CancellationToken)
Determines whether a sequence contains any elements.
public static Task<bool> AnyAsync<TSource>(this IMongoQueryable<TSource> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence to check for being empty.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
AppendStage<TSource, TResult>(IMongoQueryable<TSource>, PipelineStageDefinition<TSource, TResult>, IBsonSerializer<TResult>)
Appends an arbitrary stage to the LINQ pipeline.
public static IMongoQueryable<TResult> AppendStage<TSource, TResult>(this IMongoQueryable<TSource> source, PipelineStageDefinition<TSource, TResult> stage, IBsonSerializer<TResult> resultSerializer = null)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
stagePipelineStageDefinition<TSource, TResult>The stage to append.
resultSerializerIBsonSerializer<TResult>The result serializer.
Returns
- IMongoQueryable<TResult>
The queryable with a new stage appended.
Type Parameters
TSourceThe type of the elements of
source.TResultThe type of the result values returned by the appended stage.
As<TSource, TResult>(IMongoQueryable<TSource>, IBsonSerializer<TResult>)
Allows the results to be interpreted as a different type. It is up to the caller to determine that the new result type is compatible with the actual results.
public static IMongoQueryable<TResult> As<TSource, TResult>(this IMongoQueryable<TSource> source, IBsonSerializer<TResult> resultSerializer = null)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
resultSerializerIBsonSerializer<TResult>The new serializer (optional, will be looked up if null).
Returns
- IMongoQueryable<TResult>
A new IMongoQueryable with a new result type.
Type Parameters
TSourceThe type of the elements of
source.TResultThe new result type for the results.
AverageAsync(IMongoQueryable<decimal>, CancellationToken)
Computes the average of a sequence of decimal values.
public static Task<decimal> AverageAsync(this IMongoQueryable<decimal> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<decimal>A sequence of values to calculate the average of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
AverageAsync(IMongoQueryable<double>, CancellationToken)
Computes the average of a sequence of double values.
public static Task<double> AverageAsync(this IMongoQueryable<double> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<double>A sequence of values to calculate the average of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
AverageAsync(IMongoQueryable<int>, CancellationToken)
Computes the average of a sequence of int values.
public static Task<double> AverageAsync(this IMongoQueryable<int> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<int>A sequence of values to calculate the average of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
AverageAsync(IMongoQueryable<long>, CancellationToken)
Computes the average of a sequence of long values.
public static Task<double> AverageAsync(this IMongoQueryable<long> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<long>A sequence of values to calculate the average of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
AverageAsync(IMongoQueryable<decimal?>, CancellationToken)
Computes the average of a sequence of Nullable<T> values.
public static Task<decimal?> AverageAsync(this IMongoQueryable<decimal?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<decimal?>A sequence of values to calculate the average of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
AverageAsync(IMongoQueryable<double?>, CancellationToken)
Computes the average of a sequence of Nullable<T> values.
public static Task<double?> AverageAsync(this IMongoQueryable<double?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<double?>A sequence of values to calculate the average of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
AverageAsync(IMongoQueryable<int?>, CancellationToken)
Computes the average of a sequence of Nullable<T> values.
public static Task<double?> AverageAsync(this IMongoQueryable<int?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<int?>A sequence of values to calculate the average of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
AverageAsync(IMongoQueryable<long?>, CancellationToken)
Computes the average of a sequence of Nullable<T> values.
public static Task<double?> AverageAsync(this IMongoQueryable<long?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<long?>A sequence of values to calculate the average of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
AverageAsync(IMongoQueryable<float?>, CancellationToken)
Computes the average of a sequence of Nullable<T> values.
public static Task<float?> AverageAsync(this IMongoQueryable<float?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<float?>A sequence of values to calculate the average of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
AverageAsync(IMongoQueryable<float>, CancellationToken)
Computes the average of a sequence of float values.
public static Task<float> AverageAsync(this IMongoQueryable<float> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<float>A sequence of values to calculate the average of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
AverageAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, decimal>>, CancellationToken)
Computes the average of the sequence of decimal values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<decimal> AverageAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, decimal>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, decimal>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
AverageAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, double>>, CancellationToken)
Computes the average of the sequence of double values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<double> AverageAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, double>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, double>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
AverageAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, int>>, CancellationToken)
Computes the average of the sequence of int values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<double> AverageAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, int>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, int>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
AverageAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, long>>, CancellationToken)
Computes the average of the sequence of long values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<double> AverageAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, long>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, long>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
AverageAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, decimal?>>, CancellationToken)
Computes the average of the sequence of Nullable<T> values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<decimal?> AverageAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, decimal?>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
AverageAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, double?>>, CancellationToken)
Computes the average of the sequence of Nullable<T> values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<double?> AverageAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, double?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, double?>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
AverageAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, int?>>, CancellationToken)
Computes the average of the sequence of Nullable<T> values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<double?> AverageAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, int?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, int?>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
AverageAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, long?>>, CancellationToken)
Computes the average of the sequence of Nullable<T> values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<double?> AverageAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, long?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, long?>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
AverageAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, float?>>, CancellationToken)
Computes the average of the sequence of Nullable<T> values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<float?> AverageAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, float?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, float?>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
AverageAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, float>>, CancellationToken)
Computes the average of the sequence of float values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<float> AverageAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, float>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, float>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
CountAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, bool>>, CancellationToken)
Returns the number of elements in the specified sequence that satisfies a condition.
public static Task<int> CountAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> that contains the elements to be counted.
predicateExpression<Func<TSource, bool>>A function to test each element for a condition.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<int>
The number of elements in the sequence that satisfies the condition in the predicate function.
Type Parameters
TSourceThe type of the elements of
source.
CountAsync<TSource>(IMongoQueryable<TSource>, CancellationToken)
Returns the number of elements in a sequence.
public static Task<int> CountAsync<TSource>(this IMongoQueryable<TSource> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>The IMongoQueryable<T> that contains the elements to be counted.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
Densify<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, object>>, DensifyRange, IEnumerable<Expression<Func<TSource, object>>>)
Adds a $densify stage to the LINQ pipeline.
public static IMongoQueryable<TSource> Densify<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, object>> field, DensifyRange range, IEnumerable<Expression<Func<TSource, object>>> partitionByFields = null)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
fieldExpression<Func<TSource, object>>The field.
rangeDensifyRangeThe range.
partitionByFieldsIEnumerable<Expression<Func<TSource, object>>>The partition by fields.
Returns
- IMongoQueryable<TSource>
The densified sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
Densify<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, object>>, DensifyRange, params Expression<Func<TSource, object>>[])
Adds a $densify stage to the LINQ pipeline.
public static IMongoQueryable<TSource> Densify<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, object>> field, DensifyRange range, params Expression<Func<TSource, object>>[] partitionByFields)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
fieldExpression<Func<TSource, object>>The field.
rangeDensifyRangeThe range.
partitionByFieldsExpression<Func<TSource, object>>[]The partition by fields.
Returns
- IMongoQueryable<TSource>
The densified sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
Distinct<TSource>(IMongoQueryable<TSource>)
Returns distinct elements from a sequence by using the default equality comparer to compare values.
public static IMongoQueryable<TSource> Distinct<TSource>(this IMongoQueryable<TSource> source)
Parameters
sourceIMongoQueryable<TSource>The IMongoQueryable<T> to remove duplicates from.
Returns
- IMongoQueryable<TSource>
An IMongoQueryable<T> that contains distinct elements from
source.
Type Parameters
TSourceThe type of the elements of
source.
Documents<TDocument>(IMongoQueryable<NoPipelineInput>, IEnumerable<TDocument>, IBsonSerializer<TDocument>)
Injects a sequence of documents at the beginning of a pipeline.
public static IMongoQueryable<TDocument> Documents<TDocument>(this IMongoQueryable<NoPipelineInput> source, IEnumerable<TDocument> documents, IBsonSerializer<TDocument> documentSerializer)
Parameters
sourceIMongoQueryable<NoPipelineInput>An IMongoQueryable with no other input.
documentsIEnumerable<TDocument>The documents.
documentSerializerIBsonSerializer<TDocument>The document serializer.
Returns
- IMongoQueryable<TDocument>
An IMongoQueryable<T> whose elements are the documents.
Type Parameters
TDocumentThe type of the documents.
Documents<TDocument>(IMongoQueryable<NoPipelineInput>, params TDocument[])
Injects a sequence of documents at the beginning of a pipeline.
public static IMongoQueryable<TDocument> Documents<TDocument>(this IMongoQueryable<NoPipelineInput> source, params TDocument[] documents)
Parameters
sourceIMongoQueryable<NoPipelineInput>An IMongoQueryable with no other input.
documentsTDocument[]The documents.
Returns
- IMongoQueryable<TDocument>
An IMongoQueryable<T> whose elements are the documents.
Type Parameters
TDocumentThe type of the documents.
FirstAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, bool>>, CancellationToken)
Returns the first element of a sequence that satisfies a specified condition.
public static Task<TSource> FirstAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> to return an element from.
predicateExpression<Func<TSource, bool>>A function to test each element for a condition.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TSource>
The first element in
sourcethat passes the test inpredicate.
Type Parameters
TSourceThe type of the elements of
source.
FirstAsync<TSource>(IMongoQueryable<TSource>, CancellationToken)
Returns the first element of a sequence.
public static Task<TSource> FirstAsync<TSource>(this IMongoQueryable<TSource> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>The IMongoQueryable<T> to return the first element of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TSource>
The first element in
source.
Type Parameters
TSourceThe type of the elements of
source.
FirstOrDefaultAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, bool>>, CancellationToken)
Returns the first element of a sequence that satisfies a specified condition or a default value if no such element is found.
public static Task<TSource> FirstOrDefaultAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> to return an element from.
predicateExpression<Func<TSource, bool>>A function to test each element for a condition.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TSource>
default(
TSource) ifsourceis empty or if no element passes the test specified bypredicate; otherwise, the first element insourcethat passes the test specified bypredicate.
Type Parameters
TSourceThe type of the elements of
source.
FirstOrDefaultAsync<TSource>(IMongoQueryable<TSource>, CancellationToken)
Returns the first element of a sequence, or a default value if the sequence contains no elements.
public static Task<TSource> FirstOrDefaultAsync<TSource>(this IMongoQueryable<TSource> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>The IMongoQueryable<T> to return the first element of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TSource>
default(
TSource) ifsourceis empty; otherwise, the first element insource.
Type Parameters
TSourceThe type of the elements of
source.
GroupBy<TSource, TKey>(IMongoQueryable<TSource>, Expression<Func<TSource, TKey>>)
Groups the elements of a sequence according to a specified key selector function.
public static IMongoQueryable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IMongoQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> whose elements to group.
keySelectorExpression<Func<TSource, TKey>>A function to extract the key for each element.
Returns
- IMongoQueryable<IGrouping<TKey, TSource>>
An IMongoQueryable<T> that has a type argument of IGrouping<TKey, TElement> and where each IGrouping<TKey, TElement> object contains a sequence of objects and a key.
Type Parameters
TSourceThe type of the elements of
source.TKeyThe type of the key returned by the function represented in keySelector.
GroupBy<TSource, TKey, TResult>(IMongoQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>)
Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.
public static IMongoQueryable<TResult> GroupBy<TSource, TKey, TResult>(this IMongoQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> whose elements to group.
keySelectorExpression<Func<TSource, TKey>>A function to extract the key for each element.
resultSelectorExpression<Func<TKey, IEnumerable<TSource>, TResult>>A function to create a result value from each group.
Returns
- IMongoQueryable<TResult>
An IMongoQueryable<T> that has a type argument of TResult and where each element represents a projection over a group and its key.
Type Parameters
TSourceThe type of the elements of
source.TKeyThe type of the key returned by the function represented in keySelector.
TResultThe type of the result value returned by resultSelector.
GroupJoin<TOuter, TInner, TKey, TResult>(IMongoQueryable<TOuter>, IMongoCollection<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, IEnumerable<TInner>, TResult>>)
Correlates the elements of two sequences based on key equality and groups the results.
public static IMongoQueryable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IMongoQueryable<TOuter> outer, IMongoCollection<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IEnumerable<TInner>, TResult>> resultSelector)
Parameters
outerIMongoQueryable<TOuter>The first sequence to join.
innerIMongoCollection<TInner>The collection to join to the first sequence.
outerKeySelectorExpression<Func<TOuter, TKey>>A function to extract the join key from each element of the first sequence.
innerKeySelectorExpression<Func<TInner, TKey>>A function to extract the join key from each element of the second sequence.
resultSelectorExpression<Func<TOuter, IEnumerable<TInner>, TResult>>A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence.
Returns
- IMongoQueryable<TResult>
An IMongoQueryable<T> that contains elements of type
TResultobtained by performing a grouped join on two sequences.
Type Parameters
TOuterThe type of the elements of the first sequence.
TInnerThe type of the elements of the second sequence.
TKeyThe type of the keys returned by the key selector functions.
TResultThe type of the result elements.
GroupJoin<TOuter, TInner, TKey, TResult>(IMongoQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, IEnumerable<TInner>, TResult>>)
Correlates the elements of two sequences based on key equality and groups the results.
public static IMongoQueryable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IMongoQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IEnumerable<TInner>, TResult>> resultSelector)
Parameters
outerIMongoQueryable<TOuter>The first sequence to join.
innerIEnumerable<TInner>The sequence to join to the first sequence.
outerKeySelectorExpression<Func<TOuter, TKey>>A function to extract the join key from each element of the first sequence.
innerKeySelectorExpression<Func<TInner, TKey>>A function to extract the join key from each element of the second sequence.
resultSelectorExpression<Func<TOuter, IEnumerable<TInner>, TResult>>A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence.
Returns
- IMongoQueryable<TResult>
An IMongoQueryable<T> that contains elements of type
TResultobtained by performing a grouped join on two sequences.
Type Parameters
TOuterThe type of the elements of the first sequence.
TInnerThe type of the elements of the second sequence.
TKeyThe type of the keys returned by the key selector functions.
TResultThe type of the result elements.
Join<TOuter, TInner, TKey, TResult>(IMongoQueryable<TOuter>, IMongoCollection<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>)
Correlates the elements of two sequences based on matching keys.
public static IMongoQueryable<TResult> Join<TOuter, TInner, TKey, TResult>(this IMongoQueryable<TOuter> outer, IMongoCollection<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector)
Parameters
outerIMongoQueryable<TOuter>The first sequence to join.
innerIMongoCollection<TInner>The sequence to join to the first sequence.
outerKeySelectorExpression<Func<TOuter, TKey>>A function to extract the join key from each element of the first sequence.
innerKeySelectorExpression<Func<TInner, TKey>>A function to extract the join key from each element of the second sequence.
resultSelectorExpression<Func<TOuter, TInner, TResult>>A function to create a result element from two matching elements.
Returns
- IMongoQueryable<TResult>
An IQueryable<T> that has elements of type
TResultobtained by performing an inner join on two sequences.
Type Parameters
TOuterThe type of the elements of the first sequence.
TInnerThe type of the elements of the second sequence.
TKeyThe type of the keys returned by the key selector functions.
TResultThe type of the result elements.
Join<TOuter, TInner, TKey, TResult>(IMongoQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>)
Correlates the elements of two sequences based on matching keys.
public static IMongoQueryable<TResult> Join<TOuter, TInner, TKey, TResult>(this IMongoQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector)
Parameters
outerIMongoQueryable<TOuter>The first sequence to join.
innerIEnumerable<TInner>The sequence to join to the first sequence.
outerKeySelectorExpression<Func<TOuter, TKey>>A function to extract the join key from each element of the first sequence.
innerKeySelectorExpression<Func<TInner, TKey>>A function to extract the join key from each element of the second sequence.
resultSelectorExpression<Func<TOuter, TInner, TResult>>A function to create a result element from two matching elements.
Returns
- IMongoQueryable<TResult>
An IQueryable<T> that has elements of type
TResultobtained by performing an inner join on two sequences.
Type Parameters
TOuterThe type of the elements of the first sequence.
TInnerThe type of the elements of the second sequence.
TKeyThe type of the keys returned by the key selector functions.
TResultThe type of the result elements.
LongCountAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, bool>>, CancellationToken)
Returns the number of elements in the specified sequence that satisfies a condition.
public static Task<long> LongCountAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> that contains the elements to be counted.
predicateExpression<Func<TSource, bool>>A function to test each element for a condition.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<long>
The number of elements in the sequence that satisfies the condition in the predicate function.
Type Parameters
TSourceThe type of the elements of
source.
LongCountAsync<TSource>(IMongoQueryable<TSource>, CancellationToken)
Returns the number of elements in a sequence.
public static Task<long> LongCountAsync<TSource>(this IMongoQueryable<TSource> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>The IMongoQueryable<T> that contains the elements to be counted.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
MaxAsync<TSource>(IMongoQueryable<TSource>, CancellationToken)
Returns the maximum value in a generic IMongoQueryable<T>.
public static Task<TSource> MaxAsync<TSource>(this IMongoQueryable<TSource> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to determine the maximum of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TSource>
The maximum value in the sequence.
Type Parameters
TSourceThe type of the elements of
source.
MaxAsync<TSource, TResult>(IMongoQueryable<TSource>, Expression<Func<TSource, TResult>>, CancellationToken)
Invokes a projection function on each element of a generic IMongoQueryable<T> and returns the maximum resulting value.
public static Task<TResult> MaxAsync<TSource, TResult>(this IMongoQueryable<TSource> source, Expression<Func<TSource, TResult>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to determine the maximum of.
selectorExpression<Func<TSource, TResult>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TResult>
The maximum value in the sequence.
Type Parameters
TSourceThe type of the elements of
source.TResultThe type of the value returned by the function represented by
selector.
MinAsync<TSource>(IMongoQueryable<TSource>, CancellationToken)
Returns the minimum value in a generic IMongoQueryable<T>.
public static Task<TSource> MinAsync<TSource>(this IMongoQueryable<TSource> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to determine the minimum of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TSource>
The minimum value in the sequence.
Type Parameters
TSourceThe type of the elements of
source.
MinAsync<TSource, TResult>(IMongoQueryable<TSource>, Expression<Func<TSource, TResult>>, CancellationToken)
Invokes a projection function on each element of a generic IMongoQueryable<T> and returns the minimum resulting value.
public static Task<TResult> MinAsync<TSource, TResult>(this IMongoQueryable<TSource> source, Expression<Func<TSource, TResult>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to determine the minimum of.
selectorExpression<Func<TSource, TResult>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TResult>
The minimum value in the sequence.
Type Parameters
TSourceThe type of the elements of
source.TResultThe type of the value returned by the function represented by
selector.
OfType<TResult>(IMongoQueryable)
Filters the elements of an IMongoQueryable based on a specified type.
public static IMongoQueryable<TResult> OfType<TResult>(this IMongoQueryable source)
Parameters
sourceIMongoQueryableAn IMongoQueryable whose elements to filter.
Returns
- IMongoQueryable<TResult>
A collection that contains the elements from
sourcethat have typeTResult.
Type Parameters
TResultThe type to filter the elements of the sequence on.
OrderByDescending<TSource, TKey>(IMongoQueryable<TSource>, Expression<Func<TSource, TKey>>)
Sorts the elements of a sequence in descending order according to a key.
public static IOrderedMongoQueryable<TSource> OrderByDescending<TSource, TKey>(this IMongoQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to order.
keySelectorExpression<Func<TSource, TKey>>A function to extract a key from an element.
Returns
- IOrderedMongoQueryable<TSource>
An IOrderedMongoQueryable<T> whose elements are sorted in descending order according to a key.
Type Parameters
TSourceThe type of the elements of
source.TKeyThe type of the key returned by the function that is represented by keySelector.
OrderBy<TSource, TKey>(IMongoQueryable<TSource>, Expression<Func<TSource, TKey>>)
Sorts the elements of a sequence in ascending order according to a key.
public static IOrderedMongoQueryable<TSource> OrderBy<TSource, TKey>(this IMongoQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to order.
keySelectorExpression<Func<TSource, TKey>>A function to extract a key from an element.
Returns
- IOrderedMongoQueryable<TSource>
An IOrderedMongoQueryable<T> whose elements are sorted according to a key.
Type Parameters
TSourceThe type of the elements of
source.TKeyThe type of the key returned by the function that is represented by keySelector.
Sample<TSource>(IMongoQueryable<TSource>, long)
Returns a sample of the elements in the source.
public static IMongoQueryable<TSource> Sample<TSource>(this IMongoQueryable<TSource> source, long count)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> to return a sample of.
countlongThe number of elements in the sample.
Returns
- IMongoQueryable<TSource>
A sample of the elements in the
source.
Type Parameters
TSourceThe type of the elements of
source.
SearchMeta<TSource>(IMongoQueryable<TSource>, SearchDefinition<TSource>, string, SearchCountOptions)
Appends a $searchMeta stage to the LINQ pipeline.
public static IMongoQueryable<SearchMetaResult> SearchMeta<TSource>(this IMongoQueryable<TSource> source, SearchDefinition<TSource> searchDefinition, string indexName = null, SearchCountOptions count = null)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
searchDefinitionSearchDefinition<TSource>The search definition.
indexNamestringThe index name.
countSearchCountOptionsThe count options.
Returns
- IMongoQueryable<SearchMetaResult>
The queryable with a new stage appended.
Type Parameters
TSourceThe type of the elements of
source.
Search<TSource>(IMongoQueryable<TSource>, SearchDefinition<TSource>, SearchHighlightOptions<TSource>, string, SearchCountOptions, bool, bool)
Appends a $search stage to the LINQ pipeline.
public static IMongoQueryable<TSource> Search<TSource>(this IMongoQueryable<TSource> source, SearchDefinition<TSource> searchDefinition, SearchHighlightOptions<TSource> highlight = null, string indexName = null, SearchCountOptions count = null, bool returnStoredSource = false, bool scoreDetails = false)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
searchDefinitionSearchDefinition<TSource>The search definition.
highlightSearchHighlightOptions<TSource>The highlight options.
indexNamestringThe index name.
countSearchCountOptionsThe count options.
returnStoredSourceboolFlag that specifies whether to perform a full document lookup on the backend database or return only stored source fields directly from Atlas Search.
scoreDetailsboolFlag that specifies whether to return a detailed breakdown of the score for each document in the result.
Returns
- IMongoQueryable<TSource>
The queryable with a new stage appended.
Type Parameters
TSourceThe type of the elements of
source.
Search<TSource>(IMongoQueryable<TSource>, SearchDefinition<TSource>, SearchOptions<TSource>)
Appends a $search stage to the LINQ pipeline.
public static IMongoQueryable<TSource> Search<TSource>(this IMongoQueryable<TSource> source, SearchDefinition<TSource> searchDefinition, SearchOptions<TSource> searchOptions)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
searchDefinitionSearchDefinition<TSource>The search definition.
searchOptionsSearchOptions<TSource>The search options.
Returns
- IMongoQueryable<TSource>
The queryable with a new stage appended.
Type Parameters
TSourceThe type of the elements of
source.
SelectMany<TSource, TResult>(IMongoQueryable<TSource>, Expression<Func<TSource, IEnumerable<TResult>>>)
Projects each element of a sequence to an IEnumerable<T> and combines the resulting sequences into one sequence.
public static IMongoQueryable<TResult> SelectMany<TSource, TResult>(this IMongoQueryable<TSource> source, Expression<Func<TSource, IEnumerable<TResult>>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to project.
selectorExpression<Func<TSource, IEnumerable<TResult>>>A projection function to apply to each element.
Returns
- IMongoQueryable<TResult>
An IMongoQueryable<T> whose elements are the result of invoking a one-to-many projection function on each element of the input sequence.
Type Parameters
TSourceThe type of the elements of
source.TResultThe type of the elements of the sequence returned by the function represented by
selector.
SelectMany<TSource, TCollection, TResult>(IMongoQueryable<TSource>, Expression<Func<TSource, IEnumerable<TCollection>>>, Expression<Func<TSource, TCollection, TResult>>)
Projects each element of a sequence to an IEnumerable<T> and invokes a result selector function on each element therein. The resulting values from each intermediate sequence are combined into a single, one-dimensional sequence and returned.
public static IMongoQueryable<TResult> SelectMany<TSource, TCollection, TResult>(this IMongoQueryable<TSource> source, Expression<Func<TSource, IEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to project.
collectionSelectorExpression<Func<TSource, IEnumerable<TCollection>>>A projection function to apply to each element of the input sequence.
resultSelectorExpression<Func<TSource, TCollection, TResult>>A projection function to apply to each element of each intermediate sequence.
Returns
- IMongoQueryable<TResult>
An IMongoQueryable<T> whose elements are the result of invoking the one-to-many projection function
collectionSelectoron each element ofsourceand then mapping each of those sequence elements and their correspondingsourceelement to a result element.
Type Parameters
TSourceThe type of the elements of
source.TCollectionThe type of the intermediate elements collected by the function represented by
collectionSelector.TResultThe type of the elements of the resulting sequence.
Select<TSource, TResult>(IMongoQueryable<TSource>, Expression<Func<TSource, TResult>>)
Projects each element of a sequence into a new form by incorporating the element's index.
public static IMongoQueryable<TResult> Select<TSource, TResult>(this IMongoQueryable<TSource> source, Expression<Func<TSource, TResult>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to project.
selectorExpression<Func<TSource, TResult>>A projection function to apply to each element.
Returns
- IMongoQueryable<TResult>
An IMongoQueryable<T> whose elements are the result of invoking a projection function on each element of source.
Type Parameters
TSourceThe type of the elements of
source.TResultThe type of the value returned by the function represented by selector.
SingleAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, bool>>, CancellationToken)
Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.
public static Task<TSource> SingleAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> to return a single element from.
predicateExpression<Func<TSource, bool>>A function to test an element for a condition.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TSource>
The single element of the input sequence that satisfies the condition in
predicate.
Type Parameters
TSourceThe type of the elements of
source.
SingleAsync<TSource>(IMongoQueryable<TSource>, CancellationToken)
Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.
public static Task<TSource> SingleAsync<TSource>(this IMongoQueryable<TSource> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> to return the single element of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TSource>
The single element of the input sequence.
Type Parameters
TSourceThe type of the elements of
source.
SingleOrDefaultAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, bool>>, CancellationToken)
Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
public static Task<TSource> SingleOrDefaultAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> to return a single element from.
predicateExpression<Func<TSource, bool>>A function to test an element for a condition.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TSource>
The single element of the input sequence that satisfies the condition in
predicate, or default(TSource) if no such element is found.
Type Parameters
TSourceThe type of the elements of
source.
SingleOrDefaultAsync<TSource>(IMongoQueryable<TSource>, CancellationToken)
Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.
public static Task<TSource> SingleOrDefaultAsync<TSource>(this IMongoQueryable<TSource> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> to return the single element of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<TSource>
The single element of the input sequence, or default(
TSource) if the sequence contains no elements.
Type Parameters
TSourceThe type of the elements of
source.
Skip<TSource>(IMongoQueryable<TSource>, int)
Bypasses a specified number of elements in a sequence and then returns the remaining elements.
public static IMongoQueryable<TSource> Skip<TSource>(this IMongoQueryable<TSource> source, int count)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> to return elements from.
countintThe number of elements to skip before returning the remaining elements.
Returns
- IMongoQueryable<TSource>
An IMongoQueryable<T> that contains elements that occur after the specified index in the input sequence.
Type Parameters
TSourceThe type of the elements of source
Skip<TSource>(IMongoQueryable<TSource>, long)
Bypasses a specified number of elements in a sequence and then returns the remaining elements.
public static IMongoQueryable<TSource> Skip<TSource>(this IMongoQueryable<TSource> source, long count)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> to return elements from.
countlongThe number of elements to skip before returning the remaining elements.
Returns
- IMongoQueryable<TSource>
An IMongoQueryable<T> that contains elements that occur after the specified index in the input sequence.
Type Parameters
TSourceThe type of the elements of source
StandardDeviationPopulation(IMongoQueryable<decimal>)
Computes the population standard deviation of a sequence of values.
public static decimal StandardDeviationPopulation(this IMongoQueryable<decimal> source)
Parameters
sourceIMongoQueryable<decimal>A sequence of values to calculate the population standard deviation of.
Returns
- decimal
The population standard deviation of the sequence of values.
StandardDeviationPopulation(IMongoQueryable<double>)
Computes the population standard deviation of a sequence of values.
public static double StandardDeviationPopulation(this IMongoQueryable<double> source)
Parameters
sourceIMongoQueryable<double>A sequence of values to calculate the population standard deviation of.
Returns
- double
The population standard deviation of the sequence of values.
StandardDeviationPopulation(IMongoQueryable<int>)
Computes the population standard deviation of a sequence of values.
public static double StandardDeviationPopulation(this IMongoQueryable<int> source)
Parameters
sourceIMongoQueryable<int>A sequence of values to calculate the population standard deviation of.
Returns
- double
The population standard deviation of the sequence of values.
StandardDeviationPopulation(IMongoQueryable<long>)
Computes the population standard deviation of a sequence of values.
public static double StandardDeviationPopulation(this IMongoQueryable<long> source)
Parameters
sourceIMongoQueryable<long>A sequence of values to calculate the population standard deviation of.
Returns
- double
The population standard deviation of the sequence of values.
StandardDeviationPopulation(IMongoQueryable<decimal?>)
Computes the population standard deviation of a sequence of values.
public static decimal? StandardDeviationPopulation(this IMongoQueryable<decimal?> source)
Parameters
sourceIMongoQueryable<decimal?>A sequence of values to calculate the population standard deviation of.
Returns
- decimal?
The population standard deviation of the sequence of values.
StandardDeviationPopulation(IMongoQueryable<double?>)
Computes the population standard deviation of a sequence of values.
public static double? StandardDeviationPopulation(this IMongoQueryable<double?> source)
Parameters
sourceIMongoQueryable<double?>A sequence of values to calculate the population standard deviation of.
Returns
- double?
The population standard deviation of the sequence of values.
StandardDeviationPopulation(IMongoQueryable<int?>)
Computes the population standard deviation of a sequence of values.
public static double? StandardDeviationPopulation(this IMongoQueryable<int?> source)
Parameters
sourceIMongoQueryable<int?>A sequence of values to calculate the population standard deviation of.
Returns
- double?
The population standard deviation of the sequence of values.
StandardDeviationPopulation(IMongoQueryable<long?>)
Computes the population standard deviation of a sequence of values.
public static double? StandardDeviationPopulation(this IMongoQueryable<long?> source)
Parameters
sourceIMongoQueryable<long?>A sequence of values to calculate the population standard deviation of.
Returns
- double?
The population standard deviation of the sequence of values.
StandardDeviationPopulation(IMongoQueryable<float?>)
Computes the population standard deviation of a sequence of values.
public static float? StandardDeviationPopulation(this IMongoQueryable<float?> source)
Parameters
sourceIMongoQueryable<float?>A sequence of values to calculate the population standard deviation of.
Returns
- float?
The population standard deviation of the sequence of values.
StandardDeviationPopulation(IMongoQueryable<float>)
Computes the population standard deviation of a sequence of values.
public static float StandardDeviationPopulation(this IMongoQueryable<float> source)
Parameters
sourceIMongoQueryable<float>A sequence of values to calculate the population standard deviation of.
Returns
- float
The population standard deviation of the sequence of values.
StandardDeviationPopulationAsync(IMongoQueryable<decimal>, CancellationToken)
Computes the population standard deviation of a sequence of values.
public static Task<decimal> StandardDeviationPopulationAsync(this IMongoQueryable<decimal> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<decimal>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationPopulationAsync(IMongoQueryable<double>, CancellationToken)
Computes the population standard deviation of a sequence of values.
public static Task<double> StandardDeviationPopulationAsync(this IMongoQueryable<double> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<double>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationPopulationAsync(IMongoQueryable<int>, CancellationToken)
Computes the population standard deviation of a sequence of values.
public static Task<double> StandardDeviationPopulationAsync(this IMongoQueryable<int> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<int>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationPopulationAsync(IMongoQueryable<long>, CancellationToken)
Computes the population standard deviation of a sequence of values.
public static Task<double> StandardDeviationPopulationAsync(this IMongoQueryable<long> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<long>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationPopulationAsync(IMongoQueryable<decimal?>, CancellationToken)
Computes the population standard deviation of a sequence of values.
public static Task<decimal?> StandardDeviationPopulationAsync(this IMongoQueryable<decimal?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<decimal?>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationPopulationAsync(IMongoQueryable<double?>, CancellationToken)
Computes the population standard deviation of a sequence of values.
public static Task<double?> StandardDeviationPopulationAsync(this IMongoQueryable<double?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<double?>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationPopulationAsync(IMongoQueryable<int?>, CancellationToken)
Computes the population standard deviation of a sequence of values.
public static Task<double?> StandardDeviationPopulationAsync(this IMongoQueryable<int?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<int?>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationPopulationAsync(IMongoQueryable<long?>, CancellationToken)
Computes the population standard deviation of a sequence of values.
public static Task<double?> StandardDeviationPopulationAsync(this IMongoQueryable<long?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<long?>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationPopulationAsync(IMongoQueryable<float?>, CancellationToken)
Computes the population standard deviation of a sequence of values.
public static Task<float?> StandardDeviationPopulationAsync(this IMongoQueryable<float?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<float?>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationPopulationAsync(IMongoQueryable<float>, CancellationToken)
Computes the population standard deviation of a sequence of values.
public static Task<float> StandardDeviationPopulationAsync(this IMongoQueryable<float> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<float>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationPopulationAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, decimal>>, CancellationToken)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<decimal> StandardDeviationPopulationAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, decimal>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, decimal>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulationAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, double>>, CancellationToken)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<double> StandardDeviationPopulationAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, double>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, double>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulationAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, int>>, CancellationToken)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<double> StandardDeviationPopulationAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, int>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, int>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulationAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, long>>, CancellationToken)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<double> StandardDeviationPopulationAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, long>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, long>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulationAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, decimal?>>, CancellationToken)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<decimal?> StandardDeviationPopulationAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, decimal?>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulationAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, double?>>, CancellationToken)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<double?> StandardDeviationPopulationAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, double?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, double?>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulationAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, int?>>, CancellationToken)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<double?> StandardDeviationPopulationAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, int?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, int?>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulationAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, long?>>, CancellationToken)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<double?> StandardDeviationPopulationAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, long?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, long?>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulationAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, float?>>, CancellationToken)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<float?> StandardDeviationPopulationAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, float?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, float?>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulationAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, float>>, CancellationToken)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<float> StandardDeviationPopulationAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, float>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, float>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulation<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, decimal>>)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static decimal StandardDeviationPopulation<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, decimal>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, decimal>>A transform function to apply to each element.
Returns
- decimal
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulation<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, double>>)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static double StandardDeviationPopulation<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, double>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, double>>A transform function to apply to each element.
Returns
- double
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulation<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, int>>)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static double StandardDeviationPopulation<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, int>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, int>>A transform function to apply to each element.
Returns
- double
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulation<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, long>>)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static double StandardDeviationPopulation<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, long>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, long>>A transform function to apply to each element.
Returns
- double
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulation<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, decimal?>>)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static decimal? StandardDeviationPopulation<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, decimal?>>A transform function to apply to each element.
Returns
- decimal?
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulation<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, double?>>)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static double? StandardDeviationPopulation<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, double?>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, double?>>A transform function to apply to each element.
Returns
- double?
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulation<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, int?>>)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static double? StandardDeviationPopulation<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, int?>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, int?>>A transform function to apply to each element.
Returns
- double?
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulation<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, long?>>)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static double? StandardDeviationPopulation<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, long?>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, long?>>A transform function to apply to each element.
Returns
- double?
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulation<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, float?>>)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static float? StandardDeviationPopulation<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, float?>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, float?>>A transform function to apply to each element.
Returns
- float?
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationPopulation<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, float>>)
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static float StandardDeviationPopulation<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, float>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, float>>A transform function to apply to each element.
Returns
- float
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSample(IMongoQueryable<decimal>)
Computes the sample standard deviation of a sequence of values.
public static decimal StandardDeviationSample(this IMongoQueryable<decimal> source)
Parameters
sourceIMongoQueryable<decimal>A sequence of values to calculate the population standard deviation of.
Returns
- decimal
The population standard deviation of the sequence of values.
StandardDeviationSample(IMongoQueryable<double>)
Computes the sample standard deviation of a sequence of values.
public static double StandardDeviationSample(this IMongoQueryable<double> source)
Parameters
sourceIMongoQueryable<double>A sequence of values to calculate the population standard deviation of.
Returns
- double
The population standard deviation of the sequence of values.
StandardDeviationSample(IMongoQueryable<int>)
Computes the sample standard deviation of a sequence of values.
public static double StandardDeviationSample(this IMongoQueryable<int> source)
Parameters
sourceIMongoQueryable<int>A sequence of values to calculate the population standard deviation of.
Returns
- double
The population standard deviation of the sequence of values.
StandardDeviationSample(IMongoQueryable<long>)
Computes the sample standard deviation of a sequence of values.
public static double StandardDeviationSample(this IMongoQueryable<long> source)
Parameters
sourceIMongoQueryable<long>A sequence of values to calculate the population standard deviation of.
Returns
- double
The population standard deviation of the sequence of values.
StandardDeviationSample(IMongoQueryable<decimal?>)
Computes the sample standard deviation of a sequence of values.
public static decimal? StandardDeviationSample(this IMongoQueryable<decimal?> source)
Parameters
sourceIMongoQueryable<decimal?>A sequence of values to calculate the population standard deviation of.
Returns
- decimal?
The population standard deviation of the sequence of values.
StandardDeviationSample(IMongoQueryable<double?>)
Computes the sample standard deviation of a sequence of values.
public static double? StandardDeviationSample(this IMongoQueryable<double?> source)
Parameters
sourceIMongoQueryable<double?>A sequence of values to calculate the population standard deviation of.
Returns
- double?
The population standard deviation of the sequence of values.
StandardDeviationSample(IMongoQueryable<int?>)
Computes the sample standard deviation of a sequence of values.
public static double? StandardDeviationSample(this IMongoQueryable<int?> source)
Parameters
sourceIMongoQueryable<int?>A sequence of values to calculate the population standard deviation of.
Returns
- double?
The population standard deviation of the sequence of values.
StandardDeviationSample(IMongoQueryable<long?>)
Computes the sample standard deviation of a sequence of values.
public static double? StandardDeviationSample(this IMongoQueryable<long?> source)
Parameters
sourceIMongoQueryable<long?>A sequence of values to calculate the population standard deviation of.
Returns
- double?
The population standard deviation of the sequence of values.
StandardDeviationSample(IMongoQueryable<float?>)
Computes the sample standard deviation of a sequence of values.
public static float? StandardDeviationSample(this IMongoQueryable<float?> source)
Parameters
sourceIMongoQueryable<float?>A sequence of values to calculate the population standard deviation of.
Returns
- float?
The population standard deviation of the sequence of values.
StandardDeviationSample(IMongoQueryable<float>)
Computes the sample standard deviation of a sequence of values.
public static float StandardDeviationSample(this IMongoQueryable<float> source)
Parameters
sourceIMongoQueryable<float>A sequence of values to calculate the population standard deviation of.
Returns
- float
The population standard deviation of the sequence of values.
StandardDeviationSampleAsync(IMongoQueryable<decimal>, CancellationToken)
Computes the sample standard deviation of a sequence of values.
public static Task<decimal> StandardDeviationSampleAsync(this IMongoQueryable<decimal> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<decimal>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationSampleAsync(IMongoQueryable<double>, CancellationToken)
Computes the sample standard deviation of a sequence of values.
public static Task<double> StandardDeviationSampleAsync(this IMongoQueryable<double> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<double>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationSampleAsync(IMongoQueryable<int>, CancellationToken)
Computes the sample standard deviation of a sequence of values.
public static Task<double> StandardDeviationSampleAsync(this IMongoQueryable<int> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<int>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationSampleAsync(IMongoQueryable<long>, CancellationToken)
Computes the sample standard deviation of a sequence of values.
public static Task<double> StandardDeviationSampleAsync(this IMongoQueryable<long> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<long>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationSampleAsync(IMongoQueryable<decimal?>, CancellationToken)
Computes the sample standard deviation of a sequence of values.
public static Task<decimal?> StandardDeviationSampleAsync(this IMongoQueryable<decimal?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<decimal?>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationSampleAsync(IMongoQueryable<double?>, CancellationToken)
Computes the sample standard deviation of a sequence of values.
public static Task<double?> StandardDeviationSampleAsync(this IMongoQueryable<double?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<double?>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationSampleAsync(IMongoQueryable<int?>, CancellationToken)
Computes the sample standard deviation of a sequence of values.
public static Task<double?> StandardDeviationSampleAsync(this IMongoQueryable<int?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<int?>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationSampleAsync(IMongoQueryable<long?>, CancellationToken)
Computes the sample standard deviation of a sequence of values.
public static Task<double?> StandardDeviationSampleAsync(this IMongoQueryable<long?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<long?>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationSampleAsync(IMongoQueryable<float?>, CancellationToken)
Computes the sample standard deviation of a sequence of values.
public static Task<float?> StandardDeviationSampleAsync(this IMongoQueryable<float?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<float?>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationSampleAsync(IMongoQueryable<float>, CancellationToken)
Computes the sample standard deviation of a sequence of values.
public static Task<float> StandardDeviationSampleAsync(this IMongoQueryable<float> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<float>A sequence of values to calculate the population standard deviation of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
StandardDeviationSampleAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, decimal>>, CancellationToken)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<decimal> StandardDeviationSampleAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, decimal>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, decimal>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSampleAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, double>>, CancellationToken)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<double> StandardDeviationSampleAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, double>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, double>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSampleAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, int>>, CancellationToken)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<double> StandardDeviationSampleAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, int>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, int>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSampleAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, long>>, CancellationToken)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<double> StandardDeviationSampleAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, long>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, long>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSampleAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, decimal?>>, CancellationToken)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<decimal?> StandardDeviationSampleAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, decimal?>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSampleAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, double?>>, CancellationToken)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<double?> StandardDeviationSampleAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, double?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, double?>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSampleAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, int?>>, CancellationToken)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<double?> StandardDeviationSampleAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, int?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, int?>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSampleAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, long?>>, CancellationToken)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<double?> StandardDeviationSampleAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, long?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, long?>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSampleAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, float?>>, CancellationToken)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<float?> StandardDeviationSampleAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, float?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, float?>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSampleAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, float>>, CancellationToken)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static Task<float> StandardDeviationSampleAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, float>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, float>>A transform function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSample<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, decimal>>)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static decimal StandardDeviationSample<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, decimal>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, decimal>>A transform function to apply to each element.
Returns
- decimal
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSample<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, double>>)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static double StandardDeviationSample<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, double>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, double>>A transform function to apply to each element.
Returns
- double
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSample<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, int>>)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static double StandardDeviationSample<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, int>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, int>>A transform function to apply to each element.
Returns
- double
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSample<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, long>>)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static double StandardDeviationSample<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, long>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, long>>A transform function to apply to each element.
Returns
- double
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSample<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, decimal?>>)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static decimal? StandardDeviationSample<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, decimal?>>A transform function to apply to each element.
Returns
- decimal?
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSample<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, double?>>)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static double? StandardDeviationSample<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, double?>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, double?>>A transform function to apply to each element.
Returns
- double?
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSample<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, int?>>)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static double? StandardDeviationSample<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, int?>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, int?>>A transform function to apply to each element.
Returns
- double?
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSample<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, long?>>)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static double? StandardDeviationSample<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, long?>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, long?>>A transform function to apply to each element.
Returns
- double?
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSample<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, float?>>)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static float? StandardDeviationSample<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, float?>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, float?>>A transform function to apply to each element.
Returns
- float?
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
StandardDeviationSample<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, float>>)
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
public static float StandardDeviationSample<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, float>> selector)
Parameters
sourceIMongoQueryable<TSource>A sequence of values to calculate the population standard deviation of.
selectorExpression<Func<TSource, float>>A transform function to apply to each element.
Returns
- float
The population standard deviation of the sequence of values.
Type Parameters
TSourceThe type of the elements of
source.
SumAsync(IMongoQueryable<decimal>, CancellationToken)
Computes the sum of a sequence of decimal values.
public static Task<decimal> SumAsync(this IMongoQueryable<decimal> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<decimal>A sequence of values to calculate the sum of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
SumAsync(IMongoQueryable<double>, CancellationToken)
Computes the sum of a sequence of double values.
public static Task<double> SumAsync(this IMongoQueryable<double> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<double>A sequence of values to calculate the sum of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
SumAsync(IMongoQueryable<int>, CancellationToken)
Computes the sum of a sequence of int values.
public static Task<int> SumAsync(this IMongoQueryable<int> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<int>A sequence of values to calculate the sum of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
SumAsync(IMongoQueryable<long>, CancellationToken)
Computes the sum of a sequence of long values.
public static Task<long> SumAsync(this IMongoQueryable<long> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<long>A sequence of values to calculate the sum of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
SumAsync(IMongoQueryable<decimal?>, CancellationToken)
Computes the sum of a sequence of Nullable<T> values.
public static Task<decimal?> SumAsync(this IMongoQueryable<decimal?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<decimal?>A sequence of values to calculate the sum of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
SumAsync(IMongoQueryable<double?>, CancellationToken)
Computes the sum of a sequence of Nullable<T> values.
public static Task<double?> SumAsync(this IMongoQueryable<double?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<double?>A sequence of values to calculate the sum of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
SumAsync(IMongoQueryable<int?>, CancellationToken)
Computes the sum of a sequence of Nullable<T> values.
public static Task<int?> SumAsync(this IMongoQueryable<int?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<int?>A sequence of values to calculate the sum of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
SumAsync(IMongoQueryable<long?>, CancellationToken)
Computes the sum of a sequence of Nullable<T> values.
public static Task<long?> SumAsync(this IMongoQueryable<long?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<long?>A sequence of values to calculate the sum of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
SumAsync(IMongoQueryable<float?>, CancellationToken)
Computes the sum of a sequence of Nullable<T> values.
public static Task<float?> SumAsync(this IMongoQueryable<float?> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<float?>A sequence of values to calculate the sum of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
SumAsync(IMongoQueryable<float>, CancellationToken)
Computes the sum of a sequence of float values.
public static Task<float> SumAsync(this IMongoQueryable<float> source, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<float>A sequence of values to calculate the sum of.
cancellationTokenCancellationTokenThe cancellation token.
Returns
SumAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, decimal>>, CancellationToken)
Computes the sum of the sequence of decimal values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<decimal> SumAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, decimal>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, decimal>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
SumAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, double>>, CancellationToken)
Computes the sum of the sequence of double values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<double> SumAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, double>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, double>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
SumAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, int>>, CancellationToken)
Computes the sum of the sequence of int values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<int> SumAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, int>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, int>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
SumAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, long>>, CancellationToken)
Computes the sum of the sequence of long values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<long> SumAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, long>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, long>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
SumAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, decimal?>>, CancellationToken)
Computes the sum of the sequence of Nullable<T> values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<decimal?> SumAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, decimal?>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
SumAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, double?>>, CancellationToken)
Computes the sum of the sequence of Nullable<T> values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<double?> SumAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, double?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, double?>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
SumAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, int?>>, CancellationToken)
Computes the sum of the sequence of Nullable<T> values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<int?> SumAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, int?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, int?>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
SumAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, long?>>, CancellationToken)
Computes the sum of the sequence of Nullable<T> values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<long?> SumAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, long?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, long?>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
SumAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, float?>>, CancellationToken)
Computes the sum of the sequence of Nullable<T> values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<float?> SumAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, float?>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, float?>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
SumAsync<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, float>>, CancellationToken)
Computes the sum of the sequence of float values that is obtained by invoking a projection function on each element of the input sequence.
public static Task<float> SumAsync<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, float>> selector, CancellationToken cancellationToken = default)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
selectorExpression<Func<TSource, float>>A projection function to apply to each element.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Type Parameters
TSourceThe type of the elements of
source.
Take<TSource>(IMongoQueryable<TSource>, int)
Returns a specified number of contiguous elements from the start of a sequence.
public static IMongoQueryable<TSource> Take<TSource>(this IMongoQueryable<TSource> source, int count)
Parameters
sourceIMongoQueryable<TSource>The sequence to return elements from.
countintThe number of elements to return.
Returns
- IMongoQueryable<TSource>
An IMongoQueryable<T> that contains the specified number of elements from the start of source.
Type Parameters
TSourceThe type of the elements of
source.
Take<TSource>(IMongoQueryable<TSource>, long)
Returns a specified number of contiguous elements from the start of a sequence.
public static IMongoQueryable<TSource> Take<TSource>(this IMongoQueryable<TSource> source, long count)
Parameters
sourceIMongoQueryable<TSource>The sequence to return elements from.
countlongThe number of elements to return.
Returns
- IMongoQueryable<TSource>
An IMongoQueryable<T> that contains the specified number of elements from the start of source.
Type Parameters
TSourceThe type of the elements of
source.
ThenByDescending<TSource, TKey>(IOrderedMongoQueryable<TSource>, Expression<Func<TSource, TKey>>)
Performs a subsequent ordering of the elements in a sequence in descending order according to a key.
public static IOrderedMongoQueryable<TSource> ThenByDescending<TSource, TKey>(this IOrderedMongoQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
Parameters
sourceIOrderedMongoQueryable<TSource>A sequence of values to order.
keySelectorExpression<Func<TSource, TKey>>A function to extract a key from an element.
Returns
- IOrderedMongoQueryable<TSource>
An IOrderedMongoQueryable<T> whose elements are sorted in descending order according to a key.
Type Parameters
TSourceThe type of the elements of
source.TKeyThe type of the key returned by the function that is represented by keySelector.
ThenBy<TSource, TKey>(IOrderedMongoQueryable<TSource>, Expression<Func<TSource, TKey>>)
Performs a subsequent ordering of the elements in a sequence in ascending order according to a key.
public static IOrderedMongoQueryable<TSource> ThenBy<TSource, TKey>(this IOrderedMongoQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector)
Parameters
sourceIOrderedMongoQueryable<TSource>A sequence of values to order.
keySelectorExpression<Func<TSource, TKey>>A function to extract a key from an element.
Returns
- IOrderedMongoQueryable<TSource>
An IOrderedMongoQueryable<T> whose elements are sorted according to a key.
Type Parameters
TSourceThe type of the elements of
source.TKeyThe type of the key returned by the function that is represented by keySelector.
VectorSearch<TSource, TField>(IMongoQueryable<TSource>, FieldDefinition<TSource>, QueryVector, int, VectorSearchOptions<TSource>)
Appends a $vectorSearch stage to the LINQ pipeline.
public static IMongoQueryable<TSource> VectorSearch<TSource, TField>(this IMongoQueryable<TSource> source, FieldDefinition<TSource> field, QueryVector queryVector, int limit, VectorSearchOptions<TSource> options = null)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
fieldFieldDefinition<TSource>The field.
queryVectorQueryVectorThe query vector.
limitintThe limit.
optionsVectorSearchOptions<TSource>The options.
Returns
- IMongoQueryable<TSource>
The queryable with a new stage appended.
Type Parameters
TSourceThe type of the elements of
source.TFieldThe type of the field.
VectorSearch<TSource, TField>(IMongoQueryable<TSource>, Expression<Func<TSource, TField>>, QueryVector, int, VectorSearchOptions<TSource>)
Appends a $vectorSearch stage to the LINQ pipeline.
public static IMongoQueryable<TSource> VectorSearch<TSource, TField>(this IMongoQueryable<TSource> source, Expression<Func<TSource, TField>> field, QueryVector queryVector, int limit, VectorSearchOptions<TSource> options = null)
Parameters
sourceIMongoQueryable<TSource>A sequence of values.
fieldExpression<Func<TSource, TField>>The field.
queryVectorQueryVectorThe query vector.
limitintThe limit.
optionsVectorSearchOptions<TSource>The options.
Returns
- IMongoQueryable<TSource>
The queryable with a new stage appended.
Type Parameters
TSourceThe type of the elements of
source.TFieldThe type of the field.
Where<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, bool>>)
Filters a sequence of values based on a predicate.
public static IMongoQueryable<TSource> Where<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
Parameters
sourceIMongoQueryable<TSource>An IMongoQueryable<T> to return elements from.
predicateExpression<Func<TSource, bool>>A function to test each element for a condition.
Returns
- IMongoQueryable<TSource>
An IMongoQueryable<T> that contains elements from the input sequence that satisfy the condition specified by predicate.
Type Parameters
TSourceThe type of the elements of
source.