Jazyk

MutableAnnotatableExtensions.GetOrAddAnnotation Metoda

Definice

Získá existující poznámku s daným klíčem nebo přidá novou poznámku, pokud neexistuje.

public static Microsoft.EntityFrameworkCore.Infrastructure.Annotation GetOrAddAnnotation(this Microsoft.EntityFrameworkCore.Metadata.IMutableAnnotatable annotatable, string annotationName, string value);
static member GetOrAddAnnotation : Microsoft.EntityFrameworkCore.Metadata.IMutableAnnotatable * string * string -> Microsoft.EntityFrameworkCore.Infrastructure.Annotation
<Extension()>
Public Function GetOrAddAnnotation (annotatable As IMutableAnnotatable, annotationName As String, value As String) As Annotation

Parametry

annotatable
IMutableAnnotatable

Objekt k vyhledání nebo přidání poznámky.

annotationName
String

Klíč poznámky, která se má najít nebo přidat

value
String

Hodnota, která se má uložit do poznámky, pokud se vytvoří nový.

Návraty

Nalezená nebo přidaná poznámka.

Platí pro