protected IAggregateFluent <TEntity> CreateAggregate(FilterDefinition <TEntity> filter, SortDefinition <TEntity> sort, ReadPreference readPreference = null) { IAggregateFluent <TEntity> fluent = IMongoCollectionExtensions.Aggregate(this.GetCollection(readPreference), null).Match(filter); if (sort != null) { fluent = fluent.Sort(sort); } return(fluent); }