ConventionAnnotatableExtensions.SetOrRemoveAnnotation(IConventionAnnotatable, String, Object, Boolean) Yöntem

Tanım

Verilen ad altında depolanan ek açıklamayı ayarlar. Belirtilen ada sahip bir ek açıklama zaten varsa, var olan ek açıklamanın üzerine yazar. Belirtilmişse, var olan ek açıklamayı kaldırır null .

public static void SetOrRemoveAnnotation (this Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable annotatable, string name, object value, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation SetOrRemoveAnnotation (this Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable annotatable, string name, object value, bool fromDataAnnotation = false);
static member SetOrRemoveAnnotation : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable * string * obj * bool -> unit
static member SetOrRemoveAnnotation : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable * string * obj * bool -> Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation
<Extension()>
Public Sub SetOrRemoveAnnotation (annotatable As IConventionAnnotatable, name As String, value As Object, Optional fromDataAnnotation As Boolean = false)
<Extension()>
Public Function SetOrRemoveAnnotation (annotatable As IConventionAnnotatable, name As String, value As Object, Optional fromDataAnnotation As Boolean = false) As IConventionAnnotation

Parametreler

annotatable
IConventionAnnotatable

Ek açıklamanın ayarlanacağı nesne.

name
String

Eklenecek ek açıklamanın adı.

value
Object

Ek açıklamada depolanacak değer.

fromDataAnnotation
Boolean

Yapılandırmanın bir veri ek açıklaması kullanılarak mı belirtilmediğini belirtir.

Döndürülenler

IConventionAnnotation

Yeni ek açıklama veya null kaldırılmışsa.

Şunlara uygulanır