DbMigration.DropForeignKey Method

Definition

Overloads

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.

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.

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.

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.

DropForeignKey(String, String, String, String, Object)

Caution

The principalColumn parameter is no longer required and can be removed.

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 internal void DropForeignKey (string dependentTable, string dependentColumn, string principalTable, string principalColumn, object anonymousArguments = null);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="principalColumn")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
[System.Obsolete("The principalColumn parameter is no longer required and can be removed.")]
protected internal void DropForeignKey (string dependentTable, string dependentColumn, string principalTable, string principalColumn, object anonymousArguments = null);
member this.DropForeignKey : string * string * string * string * obj -> unit
Protected Friend Sub DropForeignKey (dependentTable As String, dependentColumn As String, principalTable As String, principalColumn As String, Optional anonymousArguments As Object = null)

Parameters

dependentTable
String

The table that contains the foreign key column. Schema name is optional, if no schema is specified then dbo is assumed.

dependentColumn
String

The foreign key column.

principalTable
String

The table that contains the column this foreign key references. Schema name is optional, if no schema is specified then dbo is assumed.

principalColumn
String

The columns this foreign key references.

anonymousArguments
Object

Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.

Attributes

Applies to

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 internal void DropForeignKey (string dependentTable, string[] dependentColumns, string principalTable, object anonymousArguments = null);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void DropForeignKey (string dependentTable, string[] dependentColumns, string principalTable, object anonymousArguments = null);
member this.DropForeignKey : string * string[] * string * obj -> unit
Protected Friend Sub DropForeignKey (dependentTable As String, dependentColumns As String(), principalTable As String, Optional anonymousArguments As Object = null)

Parameters

dependentTable
String

The table that contains the foreign key columns. Schema name is optional, if no schema is specified then dbo is assumed.

dependentColumns
String[]

The foreign key columns.

principalTable
String

The table that contains the columns this foreign key references. Schema name is optional, if no schema is specified then dbo is assumed.

anonymousArguments
Object

Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.

Attributes

Applies to

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 internal void DropForeignKey (string dependentTable, string name, object anonymousArguments = null);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void DropForeignKey (string dependentTable, string name, object anonymousArguments = null);
member this.DropForeignKey : string * string * obj -> unit
Protected Friend Sub DropForeignKey (dependentTable As String, name As String, Optional anonymousArguments As Object = null)

Parameters

dependentTable
String

The table that contains the foreign key column. Schema name is optional, if no schema is specified then dbo is assumed.

name
String

The name of the foreign key constraint in the database.

anonymousArguments
Object

Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.

Attributes

Applies to

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.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void DropForeignKey (string dependentTable, string dependentColumn, string principalTable, object anonymousArguments = null);
member this.DropForeignKey : string * string * string * obj -> unit
Protected Friend Sub DropForeignKey (dependentTable As String, dependentColumn As String, principalTable As String, Optional anonymousArguments As Object = null)

Parameters

dependentTable
String

The table that contains the foreign key column. Schema name is optional, if no schema is specified then dbo is assumed.

dependentColumn
String

The foreign key column.

principalTable
String

The table that contains the column this foreign key references. Schema name is optional, if no schema is specified then dbo is assumed.

anonymousArguments
Object

Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.

Attributes

Applies to