AnnotationCodeGenerator.GenerateDataAnnotation Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GenerateDataAnnotation(IEntityType, IAnnotation) |
Returns a data annotation attribute code fragment for the given |
GenerateDataAnnotation(IProperty, IAnnotation) |
Returns a data annotation attribute code fragment for the given |
GenerateDataAnnotation(IEntityType, IAnnotation)
- Source:
- AnnotationCodeGenerator.cs
- Source:
- AnnotationCodeGenerator.cs
- Source:
- AnnotationCodeGenerator.cs
- Source:
- AnnotationCodeGenerator.cs
- Source:
- AnnotationCodeGenerator.cs
Returns a data annotation attribute code fragment for the given annotation
,
or null
if no data annotation exists for it.
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
Parameters
- entityType
- IEntityType
The IEntityType.
- annotation
- IAnnotation
The IAnnotation.
Returns
null
.
Remarks
The default implementation always returns null
.
Applies to
GenerateDataAnnotation(IProperty, IAnnotation)
- Source:
- AnnotationCodeGenerator.cs
- Source:
- AnnotationCodeGenerator.cs
- Source:
- AnnotationCodeGenerator.cs
- Source:
- AnnotationCodeGenerator.cs
- Source:
- AnnotationCodeGenerator.cs
Returns a data annotation attribute code fragment for the given annotation
,
or null
if no data annotation exists for it.
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
Parameters
- annotation
- IAnnotation
The IAnnotation.
Returns
null
.
Remarks
The default implementation always returns null
.
Applies to
Entity Framework