語言

OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>.HasAnnotation 方法

定義

新增或更新擁有實體類型的註解。 如果已有標註中指定的 annotation 鍵,其值會被更新。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> HasAnnotation(string annotation, object? value);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> HasAnnotation(string annotation, object value);
override this.HasAnnotation : string * obj -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'OwnerEntity, 'DependentEntity (requires 'OwnerEntity : null and 'DependentEntity : null)>
override this.HasAnnotation : string * obj -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)>
Public Overridable Function HasAnnotation (annotation As String, value As Object) As OwnedNavigationBuilder(Of TOwnerEntity, TDependentEntity)
Public Overridable Function HasAnnotation (annotation As String, value As Object) As OwnedNavigationBuilder(Of TEntity, TDependentEntity)

參數

annotation
String

註解的鍵需新增或更新。

value
Object

註解中要儲存的值。

傳回

OwnedNavigationBuilder<TEntity,TDependentEntity>

同一個建構器實例,這樣可以串接多個設定呼叫。

適用於