DbMigration.DropColumn 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.
Overloads
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. |
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.
protected internal void DropColumn (string table, string name, object anonymousArguments = null);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void DropColumn (string table, string name, object anonymousArguments = null);
member this.DropColumn : string * string * obj -> unit
Protected Friend Sub DropColumn (table As String, name As String, Optional anonymousArguments As Object = null)
Parameters
- table
- 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
- String
The name of the column to be dropped.
- 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
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.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void DropColumn (string table, string name, System.Collections.Generic.IDictionary<string,object> removedAnnotations, object anonymousArguments = null);
member this.DropColumn : string * string * System.Collections.Generic.IDictionary<string, obj> * obj -> unit
Protected Friend Sub DropColumn (table As String, name As String, removedAnnotations As IDictionary(Of String, Object), Optional anonymousArguments As Object = null)
Parameters
- table
- 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
- String
The name of the column to be dropped.
- removedAnnotations
- IDictionary<String,Object>
Custom annotations that exist on the column that is being dropped. May be null or empty.
- 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