Metodo DbMigration.DropPrimaryKey (String, 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 una chiave primaria esistente a cui non è assegnato il nome predefinito. 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 DropPrimaryKey ( _
table As String, _
name As String, _
anonymousArguments As Object _
)
'Utilizzo
Dim table As String
Dim name As String
Dim anonymousArguments As Object
Me.DropPrimaryKey(table, name, anonymousArguments)
[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
protected internal void DropPrimaryKey(
string table,
string name,
Object anonymousArguments
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1026:DefaultParametersShouldNotBeUsed")]
protected public:
void DropPrimaryKey(
String^ table,
String^ name,
Object^ anonymousArguments
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")>]
member DropPrimaryKey :
table:string *
name:string *
anonymousArguments:Object -> unit
function DropPrimaryKey(
table : String,
name : String,
anonymousArguments : Object
)
Parametri
- table
Tipo: System.String
Tabella che contiene la colonna di chiave primaria. Il nome dello schema è facoltativo. Se non si specifica uno schema, viene usato dbo.
- name
Tipo: System.String
Nome della chiave primaria da eliminare.
- 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" }'.