ReferenceOwnershipBuilder<TEntity,TRelatedEntity>.HasEntityTypeAnnotation 方法

定义

在拥有的实体类型上添加或更新批注。 如果已存在具有中 annotation 指定键的批注,则其值将更新。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<TEntity,TRelatedEntity> HasEntityTypeAnnotation (string annotation, object value);
override this.HasEntityTypeAnnotation : string * obj -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)>
Public Overridable Function HasEntityTypeAnnotation (annotation As String, value As Object) As ReferenceOwnershipBuilder(Of TEntity, TRelatedEntity)

参数

annotation
String

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

value
Object

要存储在批注中的值。

返回

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

适用于