語言

AnnotationCodeGenerator.GenerateDataAnnotation 方法

定義

多載

名稱 Description
GenerateDataAnnotation(IEntityType, IAnnotation)

回傳給定 annotation的資料註解屬性片段,若 null 不存在資料註解則回傳。

GenerateDataAnnotation(IProperty, IAnnotation)

回傳給定 annotation的資料註解屬性片段,若 null 不存在資料註解則回傳。

GenerateDataAnnotation(IEntityType, IAnnotation)

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

回傳給定 annotation的資料註解屬性片段,若 null 不存在資料註解則回傳。

protected virtual Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment? GenerateDataAnnotation(Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation annotation);
protected virtual Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment GenerateDataAnnotation(Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation annotation);
abstract member GenerateDataAnnotation : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation -> Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment
override this.GenerateDataAnnotation : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation -> Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment
Protected Overridable Function GenerateDataAnnotation (entityType As IEntityType, annotation As IAnnotation) As AttributeCodeFragment

參數

entityType
IEntityType

IEntityType。

annotation
IAnnotation

IAnnotation。

傳回

null。

備註

預設實作一律會傳 null回 。

適用於

GenerateDataAnnotation(IProperty, IAnnotation)

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

回傳給定 annotation的資料註解屬性片段,若 null 不存在資料註解則回傳。

protected virtual Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment? GenerateDataAnnotation(Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation annotation);
protected virtual Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment GenerateDataAnnotation(Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation annotation);
abstract member GenerateDataAnnotation : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation -> Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment
override this.GenerateDataAnnotation : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation -> Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment
Protected Overridable Function GenerateDataAnnotation (property As IProperty, annotation As IAnnotation) As AttributeCodeFragment

參數

property
IProperty

IProperty。

annotation
IAnnotation

IAnnotation。

傳回

null。

備註

預設實作一律會傳 null回 。

適用於