Sdílet prostřednictvím


ReferenceOwnershipBuilder<TEntity,TRelatedEntity>.HasForeignKeyAnnotation Metoda

Definice

Přidá nebo aktualizuje poznámku k cizímu klíči. Pokud anotaci s klíčem zadaným v annotation již existuje, její hodnota se aktualizuje.

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

Parametry

annotation
String

Klíč poznámky, která se má přidat nebo aktualizovat.

value
Object

Hodnota, která má být uložena v poznámce.

Návraty

Stejná instance tvůrce, aby bylo možné zřetězených více volání konfigurace.

Platí pro