/// <summary> /// Returns true if any of the document of the collection matches the filter condition. /// </summary> /// <typeparam name="TDocument">The type representing a Document.</typeparam> /// <param name="filter">A LINQ expression filter.</param> /// <param name="partitionKey">An optional partition key.</param> public bool Any <TDocument>(Expression <Func <TDocument, bool> > filter, string partitionKey = null) where TDocument : IDocument <TKey> { return(MongoDbReader.Any <TDocument, TKey>(filter, partitionKey)); }
/// <summary> /// Returns true if any of the document of the collection matches 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> /// <param name="condition">A mongodb filter definition.</param> /// <param name="countOption">A mongodb counting option.</param> /// <param name="partitionKey">An optional partition key.</param> public bool Any <TDocument, TKey>(FilterDefinition <TDocument> condition, CountOptions countOption = null, string partitionKey = null) where TDocument : IDocument <TKey> where TKey : IEquatable <TKey> { return(MongoDbReader.Any <TDocument, TKey>(condition, countOption, partitionKey)); }