OwnershipBuilder<TEntity,TDependentEntity>.HasAnnotation Metoda

Definicja

Dodaje lub aktualizuje adnotację klucza obcego. Jeśli adnotacja z kluczem określonym w annotation już istnieje, zostanie zaktualizowana jego wartość.

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

Parametry

annotation
String

Klucz adnotacji do dodania lub zaktualizowania.

value
Object

Wartość, która ma być przechowywana w adnotacji.

Zwraca

To samo wystąpienie konstruktora, aby można było połączyć łańcuch wielu wywołań konfiguracji.

Dotyczy