AnnotationCodeGenerator.GenerateDataAnnotation 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
GenerateDataAnnotation(IEntityType, IAnnotation) |
返回给定 |
GenerateDataAnnotation(IProperty, IAnnotation) |
返回给定 |
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
参数
- entityType
- IEntityType
- annotation
- IAnnotation
返回
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
参数
- annotation
- IAnnotation
返回
null
.
注解
默认实现始终返回 null
。