Share via


EntityContext Class

 

The EntityContext is an abstract base class which provides the same functionality as the DbContext scaffolded by Visual Studio. It is optional to use this base class instead of the scaffolded code when using a TableController<TData>.

Namespace:   Microsoft.WindowsAzure.Mobile.Service
Assembly:  Microsoft.WindowsAzure.Mobile.Service.Entity (in Microsoft.WindowsAzure.Mobile.Service.Entity.dll)

Inheritance Hierarchy

System.Object
  System.Data.Entity.DbContext
    Microsoft.WindowsAzure.Mobile.Service.EntityContext

Syntax

public abstract class EntityContext : DbContext
public ref class EntityContext abstract : DbContext
[<AbstractClass>]
type EntityContext = 
    class
        inherit DbContext
    end
Public MustInherit Class EntityContext
    Inherits DbContext

Constructors

Name Description
System_CAPS_protmethod EntityContext()

Initializes a new instance of the EntityContext with the default schema name derived from the service name.

System_CAPS_protmethod EntityContext(String)

Initializes a new instance of the EntityContext with a given schema.

System_CAPS_protmethod EntityContext(String, String)

Initializes a new instance of the EntityContext with a given schema and nameOrConnectionString.

Properties

Name Description
System_CAPS_pubproperty ChangeTracker

(Inherited from DbContext.)

System_CAPS_pubproperty Configuration

(Inherited from DbContext.)

System_CAPS_pubproperty Database

(Inherited from DbContext.)

System_CAPS_protproperty Schema

Gets or sets the default database schema name. This default database schema name is used for database objects that do not have an explicitly configured schema name. If the schema name is null or empty then a default schema name is derived from the service name.

Methods

Name Description
System_CAPS_pubmethod Dispose()

(Inherited from DbContext.)

System_CAPS_protmethod Dispose(Boolean)

(Inherited from DbContext.)

System_CAPS_pubmethod Entry(Object)

(Inherited from DbContext.)

System_CAPS_pubmethod Entry<TEntity>(TEntity)

(Inherited from DbContext.)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod GetValidationErrors()

(Inherited from DbContext.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod OnModelCreating(DbModelBuilder)

(Overrides DbContext.OnModelCreating(DbModelBuilder).)

System_CAPS_pubmethod SaveChanges()

(Inherited from DbContext.)

System_CAPS_pubmethod SaveChangesAsync()

(Inherited from DbContext.)

System_CAPS_pubmethod SaveChangesAsync(CancellationToken)

(Inherited from DbContext.)

System_CAPS_pubmethod Set(Type)

(Inherited from DbContext.)

System_CAPS_pubmethod Set<TEntity>()

(Inherited from DbContext.)

System_CAPS_protmethod ShouldValidateEntity(DbEntityEntry)

(Inherited from DbContext.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_protmethod ValidateEntity(DbEntityEntry, IDictionary<Object, Object>)

(Inherited from DbContext.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.WindowsAzure.Mobile.Service Namespace

Return to top