Class MongoDbIndex<TEntity>
An index for MongoDB.
Inheritance
System.Object
MongoDbIndex<TEntity>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Cqrs.MongoDB.DataStores.Indexes
Assembly: Cqrs.MongoDB.dll
Syntax
public abstract class MongoDbIndex<TEntity>
Type Parameters
Name | Description |
---|---|
TEntity | The System.Type of IEntity this index is for. |
Constructors
MongoDbIndex()
Instantiate a new instance of MongoDbIndex<TEntity>.
Declaration
protected MongoDbIndex()
Properties
IsAcending
Indicates if the index is in ascending order or descending. Defaults to true meaning ascending order.
Declaration
public bool IsAcending { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsUnique
Indicates if the index enforces unique values. Defaults to false.
Declaration
public bool IsUnique { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
The name of the index. Default to the class name removing any instances of "Index" and "MongoDbIndex" from the name.
Declaration
public string Name { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
Selectors
The selectors that the index is comprised of.
Declaration
public IEnumerable<Expression<Func<TEntity, object>>> Selectors { get; protected set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression<System.Func<TEntity, System.Object>>> |