Export (0) Print
Expand All

DbMigration Methods

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

The DbMigration type exposes the following members.

  NameDescription
Protected method AddColumn Adds an operation to add a column to an existing table. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method AddForeignKey(String, String, String, String, Boolean, String, Object) Adds an operation to create a new foreign key constraint. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method AddForeignKey(String, String[], String, String[], Boolean, String, Object) Adds an operation to create a new foreign key constraint. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method AddPrimaryKey(String, String, String, Boolean, Object) Adds an operation to create a new primary key. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method AddPrimaryKey(String, String[], String, Boolean, Object) Adds an operation to create a new primary key based on multiple columns. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method AlterColumn Adds an operation to alter the definition of an existing column. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Public method AlterStoredProcedure(String, String, Object) Adds an operation to alter a stored procedure. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Public method AlterStoredProcedure<TParameters>(String, Func<ParameterBuilder, TParameters>, String, Object) Adds an operation to alter a stored procedure. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method AlterTableAnnotations<TColumns> Adds an operation to handle changes in the annotations defined on tables. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method CreateIndex(String, String, Boolean, String, Boolean, Object) Adds an operation to create an index on a single column. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method CreateIndex(String, String[], Boolean, String, Boolean, Object) Adds an operation to create an index on multiple columns. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Public method CreateStoredProcedure(String, String, Object) Adds an operation to create a new stored procedure. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Public method CreateStoredProcedure<TParameters>(String, Func<ParameterBuilder, TParameters>, String, Object) Adds an operation to create a new stored procedure. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method CreateTable<TColumns>(String, Func<ColumnBuilder, TColumns>, Object) Adds an operation to create a new table. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method CreateTable<TColumns>(String, Func<ColumnBuilder, TColumns>, IDictionary<String, Object>, Object) Adds an operation to create a new table. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Public method Down Operations to be performed during the downgrade process.
Protected method DropColumn(String, String, Object) Adds an operation to drop an existing column. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropColumn(String, String, IDictionary<String, Object>, Object) Adds an operation to drop an existing column. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropForeignKey(String, String, Object) Adds an operation to drop a foreign key constraint based on its name. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropForeignKey(String, String, String, Object) Adds an operation to drop a foreign key constraint based on the column it targets. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropForeignKey(String, String[], String, Object) Adds an operation to drop a foreign key constraint based on the columns it targets. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropForeignKey(String, String, String, String, Object) Obsolete. Adds an operation to drop a foreign key constraint based on the column it targets. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropIndex(String, String, Object) Adds an operation to drop an index based on its name. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropIndex(String, String[], Object) Adds an operation to drop an index based on the columns it targets. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropPrimaryKey(String, Object) Adds an operation to drop an existing primary key that was created with the default name. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropPrimaryKey(String, String, Object) Adds an operation to drop an existing primary key that does not have the default name. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Public method DropStoredProcedure Adds an operation to drop an existing stored procedure with the specified name. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropTable(String, Object) Adds an operation to drop a table. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropTable(String, IDictionary<String, IDictionary<String, Object>>, Object) Adds an operation to drop a table. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropTable(String, IDictionary<String, Object>, Object) Adds an operation to drop a table. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method DropTable(String, IDictionary<String, Object>, IDictionary<String, IDictionary<String, Object>>, Object) Adds an operation to drop a table. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Public method Equals Determines whether this instance is equal to a specified object. (Overrides Object.Equals(Object).)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode Returns the hash function for the current object. (Overrides Object.GetHashCode().)
Public method GetType Returns the runtime type of the current instance.
Protected method MemberwiseClone Creates a shallow copy of the current object.
Protected method MoveStoredProcedure Adds an operation to move a stored procedure to a new schema. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method MoveTable Adds an operation to move a table to a new schema. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method RenameColumn Adds an operation to rename a column. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method RenameIndex Adds an operation to rename an index. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method RenameStoredProcedure Adds an operation to rename a stored procedure. To change the schema of a stored procedure use MoveStoredProcedure Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method RenameTable Adds an operation to rename a table. To change the schema of a table use MoveTable. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method Sql Adds an operation to execute a SQL command. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method SqlFile Adds an operation to execute a SQL file. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Protected method SqlResource Adds an operation to execute a SQL resource file. Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.
Public method ToString Returns a string that represents the current object. (Overrides Object.ToString().)
Public method Up Operations to be performed during the upgrade process.
Top

  NameDescription
Explicit interface implemetation Private method IDbMigration.AddOperation Adds a migration operation.
Top
Show:
© 2015 Microsoft