MongoRepository documentation
IRepositoryManagerT, TKeyEnsureIndexes Method (IMongoIndexKeys, IMongoIndexOptions) |
Ensures that the desired indexes exist and creates them if they don't exist.
Namespace: MongoRepository
Assembly: MongoRepository.Net45 (in MongoRepository.Net45.dll) Version: 1.6.11.0 (1.6.11.0)
Syntax
void EnsureIndexes( IMongoIndexKeys keys, IMongoIndexOptions options )
Sub EnsureIndexes ( keys As IMongoIndexKeys, options As IMongoIndexOptions )
void EnsureIndexes( IMongoIndexKeys^ keys, IMongoIndexOptions^ options )
abstract EnsureIndexes : keys : IMongoIndexKeys * options : IMongoIndexOptions -> unit
Parameters
- keys
- Type: IMongoIndexKeys
The indexed fields. - options
- Type: IMongoIndexOptions
The index options.
Remarks
This is a convenience method for EnsureIndexes(IMongoIndexKeys keys, IMongoIndexOptions options).
Index will be ascending order, non-unique, non-sparse.
See Also