IAnnotationCodeGenerator.GenerateDataAnnotationAttributes 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
GenerateDataAnnotationAttributes(IAnnotatable, IDictionary<String,IAnnotation>) |
对于具有相应数据注释属性的给定批注, 返回这些属性代码片段并删除注释。 |
GenerateDataAnnotationAttributes(IEntityType, IDictionary<String,IAnnotation>) |
对于具有相应数据注释属性的给定批注, 返回这些属性代码片段并删除注释。 |
GenerateDataAnnotationAttributes(IProperty, IDictionary<String,IAnnotation>) |
对于具有相应数据注释属性的给定批注, 返回这些属性代码片段并删除注释。 |
GenerateDataAnnotationAttributes(IAnnotatable, IDictionary<String,IAnnotation>)
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
对于具有相应数据注释属性的给定批注, 返回这些属性代码片段并删除注释。
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)
参数
- annotatable
- IAnnotatable
应用批注的可批注。
- annotations
- IDictionary<String,IAnnotation>
要从中生成 Fluent API 调用的批注集。
返回
适用于
GenerateDataAnnotationAttributes(IEntityType, IDictionary<String,IAnnotation>)
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
对于具有相应数据注释属性的给定批注, 返回这些属性代码片段并删除注释。
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)
参数
- entityType
- IEntityType
应用批注的实体类型。
- annotations
- IDictionary<String,IAnnotation>
要从中生成 Fluent API 调用的批注集。
返回
适用于
GenerateDataAnnotationAttributes(IProperty, IDictionary<String,IAnnotation>)
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
- Source:
- IAnnotationCodeGenerator.cs
对于具有相应数据注释属性的给定批注, 返回这些属性代码片段并删除注释。
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)
参数
- property
- IProperty
应用批注的属性。
- annotations
- IDictionary<String,IAnnotation>
要从中生成 Fluent API 调用的批注集。