Class EFContext<TContext>
Represents a MySQL Entity Framework database context.
Namespace: NFive.SDK.Server.Storage
Assembly: NFive.SDK.Server.net.dll
Syntax
public abstract class EFContext<TContext> : DbContext where TContext : DbContext
Type Parameters
Name | Description |
---|---|
TContext | The type of the database context. |
Constructors
| Improve this Doc View SourceEFContext()
Initializes a new instance of the EFContext<TContext> class.
Declaration
protected EFContext()
EFContext(String)
Initializes a new instance of the EFContext<TContext> class.
Declaration
protected EFContext(string connectionString)
Parameters
Type | Name | Description |
---|---|---|
String | connectionString | The MySQL database connection string. |
Methods
| Improve this Doc View SourceOnModelCreating(DbModelBuilder)
This method is called when the model for a derived context has been initialized, but before the model has been locked down and used to initialize the context.
Declaration
protected override void OnModelCreating(DbModelBuilder modelBuilder)
Parameters
Type | Name | Description |
---|---|---|
DbModelBuilder | modelBuilder | The builder that defines the model for the context being created. |