語言

AnnotationCodeGenerator.GenerateDataAnnotationAttributes 方法

定義

多載

名稱 Description
GenerateDataAnnotationAttributes(IAnnotatable, IDictionary<String,IAnnotation>)

對於具有對應資料註解屬性的註解,回傳這些屬性代碼片段並移除註解。

GenerateDataAnnotationAttributes(IEntityType, IDictionary<String,IAnnotation>)

對於具有對應資料註解屬性的註解,回傳這些屬性代碼片段並移除註解。

GenerateDataAnnotationAttributes(IProperty, IDictionary<String,IAnnotation>)

對於具有對應資料註解屬性的註解,回傳這些屬性代碼片段並移除註解。

GenerateDataAnnotationAttributes(IAnnotatable, IDictionary<String,IAnnotation>)

來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs

對於具有對應資料註解屬性的註解,回傳這些屬性代碼片段並移除註解。

public virtual System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment> GenerateDataAnnotationAttributes(Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable annotatable, System.Collections.Generic.IDictionary<string,Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> annotations);
abstract member GenerateDataAnnotationAttributes : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable * System.Collections.Generic.IDictionary<string, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
override this.GenerateDataAnnotationAttributes : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable * System.Collections.Generic.IDictionary<string, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
Public Overridable Function GenerateDataAnnotationAttributes (annotatable As IAnnotatable, annotations As IDictionary(Of String, IAnnotation)) As IReadOnlyList(Of AttributeCodeFragment)

參數

annotatable
IAnnotatable

註解所應用的可註釋物件。

annotations
IDictionary<String,IAnnotation>

這是一組註解,用來產生流暢的 API 呼叫。

傳回

實作

適用於

GenerateDataAnnotationAttributes(IEntityType, IDictionary<String,IAnnotation>)

來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs

對於具有對應資料註解屬性的註解,回傳這些屬性代碼片段並移除註解。

public virtual System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment> GenerateDataAnnotationAttributes(Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, System.Collections.Generic.IDictionary<string,Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> annotations);
abstract member GenerateDataAnnotationAttributes : Microsoft.EntityFrameworkCore.Metadata.IEntityType * System.Collections.Generic.IDictionary<string, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
override this.GenerateDataAnnotationAttributes : Microsoft.EntityFrameworkCore.Metadata.IEntityType * System.Collections.Generic.IDictionary<string, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
Public Overridable Function GenerateDataAnnotationAttributes (entityType As IEntityType, annotations As IDictionary(Of String, IAnnotation)) As IReadOnlyList(Of AttributeCodeFragment)

參數

entityType
IEntityType

註解所應用的實體類型。

annotations
IDictionary<String,IAnnotation>

這是一組註解,用來產生流暢的 API 呼叫。

傳回

實作

適用於

GenerateDataAnnotationAttributes(IProperty, IDictionary<String,IAnnotation>)

來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs
來源:
AnnotationCodeGenerator.cs

對於具有對應資料註解屬性的註解,回傳這些屬性代碼片段並移除註解。

public virtual System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment> GenerateDataAnnotationAttributes(Microsoft.EntityFrameworkCore.Metadata.IProperty property, System.Collections.Generic.IDictionary<string,Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> annotations);
abstract member GenerateDataAnnotationAttributes : Microsoft.EntityFrameworkCore.Metadata.IProperty * System.Collections.Generic.IDictionary<string, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
override this.GenerateDataAnnotationAttributes : Microsoft.EntityFrameworkCore.Metadata.IProperty * System.Collections.Generic.IDictionary<string, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
Public Overridable Function GenerateDataAnnotationAttributes (property As IProperty, annotations As IDictionary(Of String, IAnnotation)) As IReadOnlyList(Of AttributeCodeFragment)

參數

property
IProperty

註解所應用的性質。

annotations
IDictionary<String,IAnnotation>

這是一組註解,用來產生流暢的 API 呼叫。

傳回

實作

適用於