示例#1
0
 /// <summary>
 /// Gets the minimum value of a property in a mongodb collections that is satisfying the filter.
 /// </summary>
 /// <typeparam name="TDocument">The document type.</typeparam>
 /// <typeparam name="TKey">The type of the primary key.</typeparam>
 /// <typeparam name="TValue">The type of the value used to order the query.</typeparam>
 /// <param name="filter">A LINQ expression filter.</param>
 /// <param name="minValueSelector">A property selector to order by ascending.</param>
 /// <param name="partitionKey">An optional partition key.</param>
 /// <param name="cancellationToken">An optional cancellation Token.</param>
 public virtual async Task <TValue> GetMinValueAsync <TDocument, TKey, TValue>(
     Expression <Func <TDocument, bool> > filter,
     Expression <Func <TDocument, TValue> > minValueSelector,
     string partitionKey = null,
     CancellationToken cancellationToken = default)
     where TDocument : IDocument <TKey>
     where TKey : IEquatable <TKey>
 {
     return(await MongoDbReader.GetMinValueAsync <TDocument, TKey, TValue>(filter, minValueSelector, partitionKey, cancellationToken));
 }
 /// <summary>
 /// Gets the minimum value of a property in a mongodb collections that is satisfying the filter.
 /// </summary>
 /// <typeparam name="TDocument">The document type.</typeparam>
 /// <typeparam name="TValue">The type of the value used to order the query.</typeparam>
 /// <param name="filter">A LINQ expression filter.</param>
 /// <param name="minValueSelector">A property selector to order by ascending.</param>
 /// <param name="partitionKey">An optional partition key.</param>
 public virtual async Task <TValue> GetMinValueAsync <TDocument, TValue>(Expression <Func <TDocument, bool> > filter, Expression <Func <TDocument, TValue> > minValueSelector, string partitionKey = null)
     where TDocument : IDocument <TKey>
 {
     return(await MongoDbReader.GetMinValueAsync <TDocument, TKey, TValue>(filter, minValueSelector, partitionKey));
 }