Condividi tramite


Metodo DbMigration.DropTable (String, Object)

[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]

Aggiunge un'operazione per eliminare la tabella. Le API di Entity Framework Migrations non sono progettate per accettare un input fornito da origini non attendibili, ad esempio l'utente finale di un'applicazione. Se viene accettato un input da tali origini, è necessario convalidarlo prima di passarlo alle API in modo da fornire protezione dagli attacchi SQL injection e da altri tipi di attacchi.

Spazio dei nomi:  System.Data.Entity.Migrations
Assembly:  EntityFramework (in EntityFramework.dll)

Sintassi

'Dichiarazione
<SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")> _
Protected Friend Sub DropTable ( _
    name As String, _
    anonymousArguments As Object _
)
'Utilizzo
Dim name As String 
Dim anonymousArguments As Object 

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

Parametri

  • name
    Tipo: System.String
    Nome della tabella da eliminare. Il nome dello schema è facoltativo. Se non si specifica uno schema, viene usato dbo.
  • anonymousArguments
    Tipo: System.Object
    Argomenti aggiuntivi che possono essere elaborati dai provider. Usare la sintassi del tipo anonimo per specificare argomenti, ad esempio ' new { SampleArgument = "MyValue" }'.

Vedere anche

Riferimento

DbMigration Classe

Overload DropTable

Spazio dei nomi System.Data.Entity.Migrations