Search Results for

    Show / Hide Table of Contents

    Class MigrationContext

    The default implementation of the IMigrationContext

    Inheritance
    object
    MigrationContext
    Implements
    IMigrationContext
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: FluentMigrator.Infrastructure
    Assembly: FluentMigrator.dll
    Syntax
    public class MigrationContext : IMigrationContext

    Constructors

    | Edit this page View Source

    MigrationContext(IQuerySchema, IAssemblyCollection, object, string)

    Initializes a new instance of the MigrationContext class.

    Declaration
    [Obsolete]
    public MigrationContext(IQuerySchema querySchema, IAssemblyCollection migrationAssemblies, object context, string connection)
    Parameters
    Type Name Description
    IQuerySchema querySchema

    The provider used to query the database

    IAssemblyCollection migrationAssemblies

    The collection of migration assemblies

    object context

    The arbitrary application context passed to the task runner

    string connection

    The database connection

    | Edit this page View Source

    MigrationContext(IQuerySchema, IServiceProvider, object, string)

    Initializes a new instance of the MigrationContext class.

    Declaration
    public MigrationContext(IQuerySchema querySchema, IServiceProvider serviceProvider, object context, string connection)
    Parameters
    Type Name Description
    IQuerySchema querySchema

    The provider used to query the database

    IServiceProvider serviceProvider

    The service provider

    object context

    The arbitrary application context passed to the task runner

    string connection

    The database connection

    Properties

    | Edit this page View Source

    ApplicationContext

    Gets or sets the arbitrary application context passed to the task runner

    Declaration
    [Obsolete("Use dependency injection to access 'application state'.")]
    public virtual object ApplicationContext { get; set; }
    Property Value
    Type Description
    object
    | Edit this page View Source

    Connection

    Gets or sets the connection string

    Declaration
    public string Connection { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Expressions

    Gets or sets the collection of expressions

    Declaration
    public virtual ICollection<IMigrationExpression> Expressions { get; set; }
    Property Value
    Type Description
    ICollection<IMigrationExpression>
    | Edit this page View Source

    MigrationAssemblies

    Gets or sets the collection of migration assemblies

    Declaration
    [Obsolete]
    public virtual IAssemblyCollection MigrationAssemblies { get; set; }
    Property Value
    Type Description
    IAssemblyCollection
    | Edit this page View Source

    QuerySchema

    Gets the IQuerySchema to access the database

    Declaration
    public virtual IQuerySchema QuerySchema { get; set; }
    Property Value
    Type Description
    IQuerySchema
    | Edit this page View Source

    ServiceProvider

    Gets the service provider used to create this migration context

    Declaration
    public IServiceProvider ServiceProvider { get; }
    Property Value
    Type Description
    IServiceProvider

    Implements

    IMigrationContext
    • Edit this page
    • View Source
    In this article
    Back to top
    Copyright © 2018 Fluent Migrator Project
    Generated by DocFX
    Creative Commons License
    FluentMigrator Documentation by FluentMigrator Project is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.