MongoRepository documentation
MongoRepositoryManagerT, TKeyEnsureIndex Method (String) |
Ensures that the desired index exist and creates it if it doesn't exist.
Namespace: MongoRepository
Assembly: MongoRepository.Net45 (in MongoRepository.Net45.dll) Version: 1.6.11.0 (1.6.11.0)
Syntax
public virtual void EnsureIndex( string keyname )
Public Overridable Sub EnsureIndex ( keyname As String )
public: virtual void EnsureIndex( String^ keyname )
abstract EnsureIndex : keyname : string -> unit override EnsureIndex : keyname : string -> unit
Parameters
- keyname
- Type: SystemString
The indexed field.
Implements
IRepositoryManagerT, TKeyEnsureIndex(String)Remarks
This is a convenience method for EnsureIndexes(IMongoIndexKeys keys, IMongoIndexOptions options).
Index will be ascending order, non-unique, non-sparse.
See Also