语言

ReferenceOwnershipBuilder.HasForeignKeyAnnotation(String, Object) 方法

定义

添加或更新外键上的批注。 如果具有指定键的 annotation 批注已存在,则会更新其值。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder HasForeignKeyAnnotation(string annotation, object value);
abstract member HasForeignKeyAnnotation : string * obj -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder
override this.HasForeignKeyAnnotation : string * obj -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder
Public Overridable Function HasForeignKeyAnnotation (annotation As String, value As Object) As ReferenceOwnershipBuilder

参数

annotation
String

要添加或更新的批注的键。

value
Object

要存储在批注中的值。

返回

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

适用于