語言

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

要找到註解的關鍵。

傳回

標註中指定名稱。

適用於