DbMigration.DropPrimaryKey Method

 

Adds an operation to drop an existing primary key that was created with the default name.

Namespace:   System.Data.Entity.Migrations
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_protmethodDropPrimaryKey(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.

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


DbMigration.DropPrimaryKey Method (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.

[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void DropPrimaryKey(
	string table,
	object anonymousArguments = null
)

Parameters

table
Type: System.String

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

anonymousArguments
Type: System.Object

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


DbMigration.DropPrimaryKey Method (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.

[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void DropPrimaryKey(
	string table,
	string name,
	object anonymousArguments = null
)

Parameters

table
Type: System.String

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

name
Type: System.String

The name of the primary key to be dropped.

anonymousArguments
Type: System.Object

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