DbMigration.DropIndex Method
Adds an operation to drop an index based on its name.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | 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. |
![]() | 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. |
DbMigration.DropIndex Method (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.
[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")] protected internal void DropIndex( string table, string name, object anonymousArguments = null )
Parameters
- table
-
Type:
System.String
The name of the table to drop the index from. Schema name is optional, if no schema is specified then dbo is assumed.
- name
-
Type:
System.String
The name of the index 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" }'.
DbMigration.DropIndex Method (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.
[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")] protected internal void DropIndex( string table, string[] columns, object anonymousArguments = null )
Parameters
- table
-
Type:
System.String
The name of the table to drop the index from. Schema name is optional, if no schema is specified then dbo is assumed.
- columns
-
Type:
System.String[]
The name of the column(s) the index targets.
- 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" }'.