NFive API Reference

NFive API Reference

    Show / Hide Table of Contents

    Class EFContext<TContext>

    Represents a MySQL Entity Framework database context.

    Inheritance
    Object
    EFContext<TContext>
    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 Source

    EFContext()

    Initializes a new instance of the EFContext<TContext> class.

    Declaration
    protected EFContext()
    | Improve this Doc View Source

    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 Source

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

    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2019 NFive