Share via


AnnotationCodeGenerator.GenerateDataAnnotation Method

Definition

Overloads

GenerateDataAnnotation(IEntityType, IAnnotation)

Returns a data annotation attribute code fragment for the given annotation, or null if no data annotation exists for it.

GenerateDataAnnotation(IProperty, IAnnotation)

Returns a data annotation attribute code fragment for the given annotation, or null if no data annotation exists for it.

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

property
IProperty

The IProperty.

annotation
IAnnotation

The IAnnotation.

Returns

null.

Remarks

The default implementation always returns null.

Applies to