共用方式為


SqlServerKeyBuilderExtensions.ForSqlServerHasName(KeyBuilder, String) 方法

定義

設定以SQL Server為目標時,資料庫中的索引鍵條件約束名稱。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder ForSqlServerHasName (this Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder keyBuilder, string name);
static member ForSqlServerHasName : Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder
<Extension()>
Public Function ForSqlServerHasName (keyBuilder As KeyBuilder, name As String) As KeyBuilder

參數

keyBuilder
KeyBuilder

要設定之索引鍵的產生器。

name
String

索引鍵名稱。

傳回

相同的產生器實例,以便鏈結多個呼叫。

適用於