DbMigration.RenameTable(String, String, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an operation to rename a table. To change the schema of a table use MoveTable.
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 RenameTable (string name, string newName, object anonymousArguments = null);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void RenameTable (string name, string newName, object anonymousArguments = null);
member this.RenameTable : string * string * obj -> unit
Protected Friend Sub RenameTable (name As String, newName As String, Optional anonymousArguments As Object = null)
Parameters
- name
- String
The name of the table to be renamed. Schema name is optional, if no schema is specified then dbo is assumed.
- newName
- String
The new name for the table. 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
Entity Framework