共用方式為


MigrationBuilder.DropUniqueConstraint(String, String, String) 方法

定義

建置 以 DropUniqueConstraintOperation 卸載現有的唯一條件約束。

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.DropUniqueConstraintOperation> DropUniqueConstraint (string name, string table, string schema = default);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.DropUniqueConstraintOperation> DropUniqueConstraint (string name, string table, string? schema = default);
abstract member DropUniqueConstraint : string * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.DropUniqueConstraintOperation>
override this.DropUniqueConstraint : string * string * string -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.DropUniqueConstraintOperation>
Public Overridable Function DropUniqueConstraint (name As String, table As String, Optional schema As String = Nothing) As OperationBuilder(Of DropUniqueConstraintOperation)

參數

name
String

要卸載的條件約束名稱。

table
String

包含條件約束的資料表。

schema
String

包含資料表的架構,或使用 null 預設架構。

傳回

允許將批註加入至作業的產生器。

備註

如需詳細資訊和範例 ,請參閱資料庫移轉

適用於