Beispiel #1
0
 /// <summary>
 /// Asynchronously returns a list of projected documents matching the filter condition.
 /// </summary>
 /// <typeparam name="TDocument">The type representing a Document.</typeparam>
 /// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
 /// <typeparam name="TProjection">The type representing the model you want to project to.</typeparam>
 /// <param name="filter">The document filter.</param>
 /// <param name="projection">The projection expression.</param>
 /// <param name="partitionKey">An optional partition key.</param>
 public virtual List <TProjection> ProjectMany <TDocument, TProjection, TKey>(Expression <Func <TDocument, bool> > filter, Expression <Func <TDocument, TProjection> > projection, string partitionKey = null)
     where TDocument : IDocument <TKey>
     where TKey : IEquatable <TKey>
     where TProjection : class
 {
     return(MongoDbReader.ProjectMany <TDocument, TProjection, TKey>(filter, projection, partitionKey));
 }