Condividi tramite


Costruttore AttributeToColumnAnnotationConvention<TAttribute, TAnnotation>

[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]

Costruisce una convenzione che crea automaticamente le annotazioni di colonna con il nome specificato utilizzando il delegato specificato della factory.

Spazio dei nomi:  System.Data.Entity.ModelConfiguration.Conventions
Assembly:  EntityFramework (in EntityFramework.dll)

Sintassi

'Dichiarazione
<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")> _
Public Sub New ( _
    annotationName As String, _
    annotationFactory As Func(Of PropertyInfo, IList(Of TAttribute), TAnnotation) _
)
'Utilizzo
Dim annotationName As String 
Dim annotationFactory As Func(Of PropertyInfo, IList(Of TAttribute), TAnnotation)

Dim instance As New AttributeToColumnAnnotationConvention(annotationName, _
    annotationFactory)
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public AttributeToColumnAnnotationConvention(
    string annotationName,
    Func<PropertyInfo, IList<TAttribute>, TAnnotation> annotationFactory
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1006:DoNotNestGenericTypesInMemberSignatures")]
public:
AttributeToColumnAnnotationConvention(
    String^ annotationName, 
    Func<PropertyInfo^, IList<TAttribute>^, TAnnotation>^ annotationFactory
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")>]
new : 
        annotationName:string * 
        annotationFactory:Func<PropertyInfo, IList<'TAttribute>, 'TAnnotation> -> AttributeToColumnAnnotationConvention
public function AttributeToColumnAnnotationConvention(
    annotationName : String, 
    annotationFactory : Func<PropertyInfo, IList<TAttribute>, TAnnotation>
)

Parametri

  • annotationName
    Tipo: System.String
    Nome delle annotazioni da creare.

Vedere anche

Riferimento

AttributeToColumnAnnotationConvention<TAttribute, TAnnotation> Classe

Spazio dei nomi System.Data.Entity.ModelConfiguration.Conventions