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

键的名称。

返回

同一生成器实例,以便可以链接多个调用。

适用于