/// <summary>
 /// Returns one document given its id.
 /// </summary>
 /// <typeparam name="TDocument">The type representing a Document.</typeparam>
 /// <param name="id">The Id of the document you want to get.</param>
 /// <param name="partitionKey">An optional partition key.</param>
 public TDocument GetById <TDocument>(TKey id, string partitionKey = null) where TDocument : IDocument <TKey>
 {
     return(MongoDbReader.GetById <TDocument, TKey>(id, partitionKey));
 }
示例#2
0
 /// <summary>
 /// Returns one document given its id.
 /// </summary>
 /// <typeparam name="TDocument">The type representing a Document.</typeparam>
 /// <typeparam name="TKey">The type of the primary key for a Document.</typeparam>
 /// <param name="id">The Id of the document you want to get.</param>
 /// <param name="partitionKey">An optional partition key.</param>
 public virtual TDocument GetById <TDocument, TKey>(TKey id, string partitionKey = null)
     where TDocument : IDocument <TKey>
     where TKey : IEquatable <TKey>
 {
     return(MongoDbReader.GetById <TDocument, TKey>(id, partitionKey));
 }