次の方法で共有


MutableAnnotatableExtensions.GetOrAddAnnotation メソッド

定義

指定したキーを持つ既存の注釈を取得するか、存在しない場合は新しい注釈を追加します。

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

パラメーター

annotatable
IMutableAnnotatable

注釈を検索または追加するオブジェクト。

annotationName
String

検索または追加する注釈のキー。

value
String

新しい注釈が作成された場合に注釈に格納される値。

戻り値

見つかった注釈または追加された注釈。

適用対象