DbMigration.DropIndex Method (String, String, Object)

[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.]

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.

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

Syntax

'Declaration
<SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")> _
Protected Friend Sub DropIndex ( _
    table As String, _
    name As String, _
    anonymousArguments As Object _
)
'Usage
Dim table As String 
Dim name As String 
Dim anonymousArguments As Object 

Me.DropIndex(table, name, anonymousArguments)
[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void DropIndex(
    string table,
    string name,
    Object anonymousArguments
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1026:DefaultParametersShouldNotBeUsed")]
protected public:
void DropIndex(
    String^ table, 
    String^ name, 
    Object^ anonymousArguments
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")>]
member DropIndex : 
        table:string * 
        name:string * 
        anonymousArguments:Object -> unit
function DropIndex(
    table : String, 
    name : String, 
    anonymousArguments : Object
)

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.
  • 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" }'.

See Also

Reference

DbMigration Class

DropIndex Overload

System.Data.Entity.Migrations Namespace