语言

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
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

参数

entityType
IEntityType

IEntityType。

annotation
IAnnotation

IAnnotation。

返回

null。

注解

默认实现始终返回 null。

适用于

GenerateDataAnnotation(IProperty, IAnnotation)

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

annotation
IAnnotation

IAnnotation。

返回

null。

注解

默认实现始终返回 null。

适用于