EntityContext Class

Definition

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>.

public abstract class EntityContext : System.Data.Entity.DbContext
type EntityContext = class
    inherit DbContext
Public MustInherit Class EntityContext
Inherits DbContext
Inheritance
EntityContext

Constructors

EntityContext()

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

EntityContext(String)

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

EntityContext(String, String)

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

Properties

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

OnModelCreating(DbModelBuilder)

Applies to