共用方式為


ScaffoldingModelExtensions.GetDataAnnotations 方法

定義

多載

GetDataAnnotations(IEntityType, IAnnotationCodeGenerator)

取得要設定實體類型的資料批註。

GetDataAnnotations(INavigation, IAnnotationCodeGenerator)

取得要設定導覽屬性的資料批註。

GetDataAnnotations(IProperty, IAnnotationCodeGenerator)

取得要設定屬性的資料批註。

GetDataAnnotations(ISkipNavigation, IAnnotationCodeGenerator)

取得資料批註,以設定略過導覽屬性。

GetDataAnnotations(IEntityType, IAnnotationCodeGenerator)

來源:
ScaffoldingModelExtensions.cs
來源:
ScaffoldingModelExtensions.cs
來源:
ScaffoldingModelExtensions.cs

取得要設定實體類型的資料批註。

[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.EntityFrameworkCore.ScaffoldingModelExtensions+<GetDataAnnotations>d__5))]
public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment> GetDataAnnotations (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Design.IAnnotationCodeGenerator annotationCodeGenerator);
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.EntityFrameworkCore.ScaffoldingModelExtensions+<GetDataAnnotations>d__5))>]
static member GetDataAnnotations : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Design.IAnnotationCodeGenerator -> seq<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
<Extension()>
Public Iterator Function GetDataAnnotations (entityType As IEntityType, annotationCodeGenerator As IAnnotationCodeGenerator) As IEnumerable(Of AttributeCodeFragment)

參數

entityType
IEntityType

實體類型。

annotationCodeGenerator
IAnnotationCodeGenerator

提供者的注釋程式碼產生器。

傳回

資料批註。

屬性

適用於

GetDataAnnotations(INavigation, IAnnotationCodeGenerator)

來源:
ScaffoldingModelExtensions.cs
來源:
ScaffoldingModelExtensions.cs
來源:
ScaffoldingModelExtensions.cs

取得要設定導覽屬性的資料批註。

[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.EntityFrameworkCore.ScaffoldingModelExtensions+<GetDataAnnotations>d__7))]
public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment> GetDataAnnotations (this Microsoft.EntityFrameworkCore.Metadata.INavigation navigation, Microsoft.EntityFrameworkCore.Design.IAnnotationCodeGenerator annotationCodeGenerator);
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.EntityFrameworkCore.ScaffoldingModelExtensions+<GetDataAnnotations>d__7))>]
static member GetDataAnnotations : Microsoft.EntityFrameworkCore.Metadata.INavigation * Microsoft.EntityFrameworkCore.Design.IAnnotationCodeGenerator -> seq<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
<Extension()>
Public Iterator Function GetDataAnnotations (navigation As INavigation, annotationCodeGenerator As IAnnotationCodeGenerator) As IEnumerable(Of AttributeCodeFragment)

參數

navigation
INavigation

瀏覽屬性。

annotationCodeGenerator
IAnnotationCodeGenerator

提供者的注釋程式碼產生器。

傳回

資料批註。

屬性

適用於

GetDataAnnotations(IProperty, IAnnotationCodeGenerator)

來源:
ScaffoldingModelExtensions.cs
來源:
ScaffoldingModelExtensions.cs
來源:
ScaffoldingModelExtensions.cs

取得要設定屬性的資料批註。

[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.EntityFrameworkCore.ScaffoldingModelExtensions+<GetDataAnnotations>d__6))]
public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment> GetDataAnnotations (this Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Design.IAnnotationCodeGenerator annotationCodeGenerator);
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.EntityFrameworkCore.ScaffoldingModelExtensions+<GetDataAnnotations>d__6))>]
static member GetDataAnnotations : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Design.IAnnotationCodeGenerator -> seq<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
<Extension()>
Public Iterator Function GetDataAnnotations (property As IProperty, annotationCodeGenerator As IAnnotationCodeGenerator) As IEnumerable(Of AttributeCodeFragment)

參數

property
IProperty

屬性。

annotationCodeGenerator
IAnnotationCodeGenerator

提供者的注釋程式碼產生器。

傳回

資料批註。

屬性

適用於

GetDataAnnotations(ISkipNavigation, IAnnotationCodeGenerator)

來源:
ScaffoldingModelExtensions.cs
來源:
ScaffoldingModelExtensions.cs
來源:
ScaffoldingModelExtensions.cs

取得資料批註,以設定略過導覽屬性。

[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.EntityFrameworkCore.ScaffoldingModelExtensions+<GetDataAnnotations>d__8))]
public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment> GetDataAnnotations (this Microsoft.EntityFrameworkCore.Metadata.ISkipNavigation skipNavigation, Microsoft.EntityFrameworkCore.Design.IAnnotationCodeGenerator annotationCodeGenerator);
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.EntityFrameworkCore.ScaffoldingModelExtensions+<GetDataAnnotations>d__8))>]
static member GetDataAnnotations : Microsoft.EntityFrameworkCore.Metadata.ISkipNavigation * Microsoft.EntityFrameworkCore.Design.IAnnotationCodeGenerator -> seq<Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment>
<Extension()>
Public Iterator Function GetDataAnnotations (skipNavigation As ISkipNavigation, annotationCodeGenerator As IAnnotationCodeGenerator) As IEnumerable(Of AttributeCodeFragment)

參數

skipNavigation
ISkipNavigation

略過導覽屬性。

annotationCodeGenerator
IAnnotationCodeGenerator

提供者的注釋程式碼產生器。

傳回

資料批註。

屬性

適用於