Condividi tramite


Metodo DbMigration.DropColumn (String, String, IDictionary<String, Object>, 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 l'eliminazione di una colonna esistente. 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 DropColumn ( _
    table As String, _
    name As String, _
    removedAnnotations As IDictionary(Of String, Object), _
    anonymousArguments As Object _
)
'Utilizzo
Dim table As String 
Dim name As String 
Dim removedAnnotations As IDictionary(Of String, Object)
Dim anonymousArguments As Object 

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

Parametri

  • table
    Tipo: System.String
    Nome della tabella da cui eliminare la colonna. 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 DropColumn

Spazio dei nomi System.Data.Entity.Migrations