Search Results for

    Show / Hide Table of Contents

    Class Entity

    Inherit this class for all entities you want to store in their own collection.

    Inheritance
    Object
    Entity
    FileEntity
    JoinRecord
    Migration
    Implements
    IEntity
    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

    Implements

    IEntity

    Extension Methods

    Extensions.Collection<T>(T)
    Extensions.CollectionName<T>(T)
    Extensions.Database<T>(T)
    Extensions.DatabaseName<T>(T)
    Extensions.DeleteAsync<T>(T, IClientSessionHandle, CancellationToken)
    Extensions.Fluent<T>(T, IClientSessionHandle, AggregateOptions)
    Extensions.InsertAsync<T>(T, IClientSessionHandle, CancellationToken)
    Extensions.NextSequentialNumberAsync<T>(T, CancellationToken)
    Extensions.Queryable<T>(T, AggregateOptions)
    Extensions.SaveAsync<T>(T, IClientSessionHandle, CancellationToken)
    Extensions.SaveExceptAsync<T>(T, IEnumerable<String>, IClientSessionHandle, CancellationToken)
    Extensions.SaveExceptAsync<T>(T, Expression<Func<T, Object>>, IClientSessionHandle, CancellationToken)
    Extensions.SaveOnlyAsync<T>(T, IEnumerable<String>, IClientSessionHandle, CancellationToken)
    Extensions.SaveOnlyAsync<T>(T, Expression<Func<T, Object>>, IClientSessionHandle, CancellationToken)
    Extensions.SavePreservingAsync<T>(T, IClientSessionHandle, CancellationToken)
    Extensions.ToDocument<T>(T)
    Extensions.ToReference<T>(T)
    Extensions.InitManyToMany<TChild>(IEntity, Expression<Func<Many<TChild>>>, Expression<Func<TChild, Object>>)
    Extensions.InitOneToMany<TChild>(IEntity, Expression<Func<Many<TChild>>>)
    In this article
    Back to top Developed by Đĵ ΝιΓΞΗΛψΚ and contributors / Licensed under MIT / Website generated by DocFX