IAnnotationCodeGenerator.GenerateDataAnnotationAttributes 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
GenerateDataAnnotationAttributes(IAnnotatable, IDictionary<String,IAnnotation>) |
For the given annotations which have corresponding data annotation attributes, returns those attribute code fragments and removes the annotations. |
GenerateDataAnnotationAttributes(IEntityType, IDictionary<String,IAnnotation>) |
For the given annotations which have corresponding data annotation attributes, returns those attribute code fragments and removes the annotations. |
GenerateDataAnnotationAttributes(IProperty, IDictionary<String,IAnnotation>) |
For the given annotations which have corresponding data annotation attributes, returns those attribute code fragments and removes the annotations. |
GenerateDataAnnotationAttributes(IAnnotatable, IDictionary<String,IAnnotation>)
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
For the given annotations which have corresponding data annotation attributes, returns those attribute code fragments and removes the annotations.
public virtual System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment> GenerateDataAnnotationAttributes (Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable annotatable, System.Collections.Generic.IDictionary<string,Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> annotations);
abstract member GenerateDataAnnotationAttributes : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable * System.Collections.Generic.IDictionary<string, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
override this.GenerateDataAnnotationAttributes : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable * System.Collections.Generic.IDictionary<string, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
Public Overridable Function GenerateDataAnnotationAttributes (annotatable As IAnnotatable, annotations As IDictionary(Of String, IAnnotation)) As IReadOnlyList(Of AttributeCodeFragment)
Parameters
- annotatable
- IAnnotatable
The annotatable to which the annotations are applied.
- annotations
- IDictionary<String,IAnnotation>
The set of annotations from which to generate fluent API calls.
Returns
Applies to
GenerateDataAnnotationAttributes(IEntityType, IDictionary<String,IAnnotation>)
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
For the given annotations which have corresponding data annotation attributes, returns those attribute code fragments and removes the annotations.
public virtual System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment> GenerateDataAnnotationAttributes (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, System.Collections.Generic.IDictionary<string,Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> annotations);
abstract member GenerateDataAnnotationAttributes : Microsoft.EntityFrameworkCore.Metadata.IEntityType * System.Collections.Generic.IDictionary<string, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
override this.GenerateDataAnnotationAttributes : Microsoft.EntityFrameworkCore.Metadata.IEntityType * System.Collections.Generic.IDictionary<string, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
Public Overridable Function GenerateDataAnnotationAttributes (entityType As IEntityType, annotations As IDictionary(Of String, IAnnotation)) As IReadOnlyList(Of AttributeCodeFragment)
Parameters
- entityType
- IEntityType
The entity type to which the annotations are applied.
- annotations
- IDictionary<String,IAnnotation>
The set of annotations from which to generate fluent API calls.
Returns
Applies to
GenerateDataAnnotationAttributes(IProperty, IDictionary<String,IAnnotation>)
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
For the given annotations which have corresponding data annotation attributes, returns those attribute code fragments and removes the annotations.
public virtual System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment> GenerateDataAnnotationAttributes (Microsoft.EntityFrameworkCore.Metadata.IProperty property, System.Collections.Generic.IDictionary<string,Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> annotations);
abstract member GenerateDataAnnotationAttributes : Microsoft.EntityFrameworkCore.Metadata.IProperty * System.Collections.Generic.IDictionary<string, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
override this.GenerateDataAnnotationAttributes : Microsoft.EntityFrameworkCore.Metadata.IProperty * System.Collections.Generic.IDictionary<string, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation> -> System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
Public Overridable Function GenerateDataAnnotationAttributes (property As IProperty, annotations As IDictionary(Of String, IAnnotation)) As IReadOnlyList(Of AttributeCodeFragment)
Parameters
- property
- IProperty
The property to which the annotations are applied.
- annotations
- IDictionary<String,IAnnotation>
The set of annotations from which to generate fluent API calls.
Returns
Applies to
Entity Framework