語言

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

傳回指定 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.

備註

預設的實作 (Implementation) 一定會傳回 null。

適用於

GenerateDataAnnotation(IProperty, IAnnotation)

來源:
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.

備註

預設的實作 (Implementation) 一定會傳回 null。

適用於