AnnotationCodeGenerator.GenerateDataAnnotation 方法

定义

重载

GenerateDataAnnotation(IEntityType, IAnnotation)

返回给定 annotation的数据注释属性代码片段,或者 null 如果不存在数据注释,则返回该片段。

GenerateDataAnnotation(IProperty, IAnnotation)

返回给定 annotation的数据注释属性代码片段,或者 null 如果不存在数据注释,则返回该片段。

GenerateDataAnnotation(IEntityType, IAnnotation)

Source:
AnnotationCodeGenerator.cs
Source:
AnnotationCodeGenerator.cs
Source:
AnnotationCodeGenerator.cs
Source:
AnnotationCodeGenerator.cs
Source:
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

参数

返回

null.

注解

默认实现始终返回 null

适用于

GenerateDataAnnotation(IProperty, IAnnotation)

Source:
AnnotationCodeGenerator.cs
Source:
AnnotationCodeGenerator.cs
Source:
AnnotationCodeGenerator.cs
Source:
AnnotationCodeGenerator.cs
Source:
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

返回

null.

注解

默认实现始终返回 null

适用于