DbMigration.DropColumn 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 existing column. 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 DropColumn ( _
table As String, _
name As String, _
anonymousArguments As Object _
)
'Usage
Dim table As String
Dim name As String
Dim anonymousArguments As Object
Me.DropColumn(table, name, anonymousArguments)
[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void DropColumn(
string table,
string name,
Object anonymousArguments
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1026:DefaultParametersShouldNotBeUsed")]
protected public:
void DropColumn(
String^ table,
String^ name,
Object^ anonymousArguments
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")>]
member DropColumn :
table:string *
name:string *
anonymousArguments:Object -> unit
function DropColumn(
table : String,
name : String,
anonymousArguments : Object
)
Parameters
- table
Type: System.String
The name of the table to drop the column from. Schema name is optional, if no schema is specified then dbo is assumed.
- name
Type: System.String
The name of the column 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" }'.