MigrationBuilder.DropPrimaryKey(String, String, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建置 , DropPrimaryKeyOperation 以卸載現有的主鍵。
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.DropPrimaryKeyOperation> DropPrimaryKey (string name, string table, string schema = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.DropPrimaryKeyOperation> DropPrimaryKey (string name, string table, string? schema = default);
abstract member DropPrimaryKey : string * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.DropPrimaryKeyOperation>
override this.DropPrimaryKey : string * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.DropPrimaryKeyOperation>
Public Overridable Function DropPrimaryKey (name As String, table As String, Optional schema As String = Nothing) As OperationBuilder(Of DropPrimaryKeyOperation)
參數
- name
- String
要卸載的主鍵條件約束名稱。
- table
- String
包含索引鍵的資料表。
- schema
- String
包含資料表的架構,或使用 null
預設架構。
傳回
建置器,允許將批註新增至作業。
備註
如需詳細資訊和範例 ,請參閱資料庫移 轉。