Metodo StructuralTypeConfiguration<TStructuralType>.Property<T> (Expression<Func<TStructuralType, T>>)
[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.]
Configura una proprietà struct definita in questo tipo.
Spazio dei nomi: System.Data.Entity.ModelConfiguration.Configuration
Assembly: EntityFramework (in EntityFramework.dll)
Sintassi
'Dichiarazione
<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")> _
<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")> _
Public Function Property(Of T As {Structure, New}) ( _
propertyExpression As Expression(Of Func(Of TStructuralType, T)) _
) As PrimitivePropertyConfiguration
'Utilizzo
Dim instance As StructuralTypeConfiguration
Dim propertyExpression As Expression(Of Func(Of TStructuralType, T))
Dim returnValue As PrimitivePropertyConfiguration
returnValue = instance.Property(propertyExpression)
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public PrimitivePropertyConfiguration Property<T>(
Expression<Func<TStructuralType, T>> propertyExpression
)
where T : struct, new()
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1011:ConsiderPassingBaseTypesAsParameters")]
public:
generic<typename T>
where T : value class, gcnew()
PrimitivePropertyConfiguration^ Property(
Expression<Func<TStructuralType, T>^>^ propertyExpression
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")>]
[<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")>]
member Property :
propertyExpression:Expression<Func<'TStructuralType, 'T>> -> PrimitivePropertyConfiguration when 'T : struct, new()
JScript does not support generic types and methods.
Parametri di tipo
- T
Tipo della proprietà configurata.
Parametri
- propertyExpression
Tipo: System.Linq.Expressions.Expression<Func<TStructuralType, T>>
Espressione lambda che rappresenta la proprietà da configurare. C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty
Valore restituito
Tipo: System.Data.Entity.ModelConfiguration.Configuration.PrimitivePropertyConfiguration
Oggetto di configurazione che può essere utilizzato per configurare la proprietà.
Vedere anche
Riferimento
StructuralTypeConfiguration<TStructuralType> Classe
Spazio dei nomi System.Data.Entity.ModelConfiguration.Configuration