Compartir a través de


MutableAnnotatableExtensions.GetOrAddAnnotation Método

Definición

Obtiene la anotación existente con una clave determinada o agrega una nueva anotación si no existe.

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

Parámetros

annotatable
IMutableAnnotatable

Objeto al que se va a buscar o agregar la anotación.

annotationName
String

Clave de la anotación que se va a encontrar o agregar.

value
String

Valor que se va a almacenar en la anotación si se crea uno nuevo.

Devoluciones

Anotación encontrada o agregada.

Se aplica a