MongoRepositoryManager(T, TKey).EnsureIndexes Method (IMongoIndexKeys, IMongoIndexOptions)

MongoRepository

MongoRepositoryManagerT, 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
public virtual void EnsureIndexes(
	IMongoIndexKeys keys,
	IMongoIndexOptions options
)
Public Overridable Sub EnsureIndexes ( 
	keys As IMongoIndexKeys,
	options As IMongoIndexOptions
)
public:
virtual void EnsureIndexes(
	IMongoIndexKeys^ keys, 
	IMongoIndexOptions^ options
)
abstract EnsureIndexes : 
        keys : IMongoIndexKeys * 
        options : IMongoIndexOptions -> unit 
override EnsureIndexes : 
        keys : IMongoIndexKeys * 
        options : IMongoIndexOptions -> unit 

Parameters

keys
Type: IMongoIndexKeys
The indexed fields.
options
Type: IMongoIndexOptions
The index options.

Implements

IRepositoryManagerT, TKeyEnsureIndexes(IMongoIndexKeys, IMongoIndexOptions)
Remarks
This method allows ultimate control but does "leak" some MongoDb specific implementation details.
See Also