共用方式為


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

要儲存在注釋中的值。

傳回

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

適用於