DbMigration.DropColumn Method
Adds an operation to drop an existing column.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | DropColumn(String, String, IDictionary<String, Object>, Object) | 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. |
![]() | DropColumn(String, String, Object) | 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. |
DbMigration.DropColumn Method (String, String, IDictionary<String, Object>, Object)
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.
[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")] protected internal void DropColumn( string table, string name, IDictionary<string, object> removedAnnotations, object anonymousArguments = null )
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.
- removedAnnotations
-
Type:
System.Collections.Generic.IDictionary<String, Object>
The custom annotations that exist on the column that is being dropped. May be null or empty.
- 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.DropColumn Method (String, String, Object)
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.
[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")] protected internal void DropColumn( string table, string name, object anonymousArguments = null )
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" }'.