Class Entity
Inherit this class for all entities you want to store in their own collection.
Implements
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: MongoDB.Entities
Assembly: MongoDB.Entities.dll
Syntax
public abstract class Entity : IEntity
Properties
ID
This property is auto managed. A new ID will be assigned for new entities upon saving.
Declaration
[BsonId]
[AsObjectId]
public string ID { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
GenerateNewID()
Override this method in order to control the generation of IDs for new entities.
Declaration
public virtual string GenerateNewID()
Returns
Type | Description |
---|---|
String |