MutableAnnotatableExtensions.GetOrAddAnnotation 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得帶有特定鍵的現有註解,或若不存在註解則新增。
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
如果新增註解,則要儲存在註解中的值。
傳回
找到或新增的註解。