DbMigration.DropTable Method (String, IDictionary<String, IDictionary<String, Object>>, 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 a table. 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", "CA1006:DoNotNestGenericTypesInMemberSignatures")> _
<SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")> _
Protected Friend Sub DropTable ( _
    name As String, _
    removedColumnAnnotations As IDictionary(Of String, IDictionary(Of String, Object)), _
    anonymousArguments As Object _
)
'Usage
Dim name As String 
Dim removedColumnAnnotations As IDictionary(Of String, IDictionary(Of String, Object))
Dim anonymousArguments As Object 

Me.DropTable(name, removedColumnAnnotations, _
    anonymousArguments)
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void DropTable(
    string name,
    IDictionary<string, IDictionary<string, Object>> removedColumnAnnotations,
    Object anonymousArguments
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1026:DefaultParametersShouldNotBeUsed")]
protected public:
void DropTable(
    String^ name, 
    IDictionary<String^, IDictionary<String^, Object^>^>^ removedColumnAnnotations, 
    Object^ anonymousArguments
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")>]
[<SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")>]
member DropTable : 
        name:string * 
        removedColumnAnnotations:IDictionary<string, IDictionary<string, Object>> * 
        anonymousArguments:Object -> unit
function DropTable(
    name : String, 
    removedColumnAnnotations : IDictionary<String, IDictionary<String, Object>>, 
    anonymousArguments : Object
)

Parameters

  • name
    Type: System.String
    The name of the table to be dropped. Schema name is optional, if no schema is specified then dbo is assumed.
  • 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" }'.

See Also

Reference

DbMigration Class

DropTable Overload

System.Data.Entity.Migrations Namespace