Share via


DbMigration.RenameIndex(String, String, String, Object) Method

Definition

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.

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

Parameters

table
String

The name of the table that contains the index to be renamed. Schema name is optional, if no schema is specified then dbo is assumed.

name
String

The name of the index to be renamed.

newName
String

The new name for the index.

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