ConventionAnnotatableExtensions.AddAnnotations 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
為物件添加註解。
public static void AddAnnotations(this Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable annotatable, System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation> annotations, bool fromDataAnnotation = false);
static member AddAnnotations : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable * seq<Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotation> * bool -> unit
<Extension()>
Public Sub AddAnnotations (annotatable As IConventionAnnotatable, annotations As IEnumerable(Of IConventionAnnotation), Optional fromDataAnnotation As Boolean = false)
參數
- annotatable
- IConventionAnnotatable
就是要加註解的物件。
- annotations
- IEnumerable<IConventionAnnotation>
註解待加入。
- fromDataAnnotation
- Boolean
表示配置是否以資料註解方式指定。