ConventionAnnotatableExtensions.GetAnnotation 方法

定義

取得具有指定名稱的注釋,如果不存在,則會擲回。

public static Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation GetAnnotation (this Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable annotatable, string annotationName);
static member GetAnnotation : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable * string -> Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation
<Extension()>
Public Function GetAnnotation (annotatable As IConventionAnnotatable, annotationName As String) As IConventionAnnotation

參數

annotatable
IConventionAnnotatable

要尋找注釋的物件。

annotationName
String

要尋找之注釋的索引鍵。

傳回

具有指定名稱的批註。

適用於