OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>.HasAnnotation Метод

Определение

Добавляет или обновляет заметку для типа принадлежащих сущностей. Если заметка с ключом, указанным в , annotation уже существует, ее значение будет обновлено.

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

Параметры

annotation
String

Ключ добавляемой или обновляемой заметки.

value
Object

Значение, которое будет храниться в заметке.

Возвращаемое значение

OwnedNavigationBuilder<TEntity,TDependentEntity>

Один и тот же экземпляр построителя, чтобы можно было объединить несколько вызовов конфигурации в цепочку.

Применяется к