语言

IAnnotationCodeGenerator.GenerateDataAnnotationAttributes 方法

定义

重载

名称 说明
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
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
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
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 调用的批注集。

返回

适用于