public Task <long> Count(IWorkContext context, FilterDefinition <TDocument> filter = null) { Verify.IsNotNull(nameof(context), context); var filterDefinition = filter ?? FilterDefinition <TDocument> .Empty; return(MongoCollection.CountDocumentsAsync(filterDefinition, options: null, cancellationToken: context.CancellationToken)); }
public Task <long> CountAsync() => MongoCollection.CountDocumentsAsync(Builders <T> .Filter.Empty);
public Task <long> CountAsync(Expression <Func <T, bool> > sel) => MongoCollection.CountDocumentsAsync(sel);
public async Task <long> Count(Expression <Func <T, bool> > filter) { return(await MongoCollection.CountDocumentsAsync(filter)); }
public async Task <int> CountAsync(Expression <Func <T, bool> > filter) { return(unchecked ((int)await MongoCollection.CountDocumentsAsync(filter))); }