Поделиться через


StructuralTypeConfiguration<TStructuralType>.Property<T> - метод (Expression<Func<TStructuralType, T>>)

[Эта страница относится к документации к Entity Framework 6. Последняя версия доступна в составе пакета Entity Framework NuGet. Дополнительные сведения об Entity Framework см. в разделе msdn.com/data/ef.]

Настраивает свойство struct, определенное для этого типа.

Пространство имен:  System.Data.Entity.ModelConfiguration.Configuration
Сборка:  EntityFramework (в EntityFramework.dll)

Синтаксис

'Декларация
<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
'Применение
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.

Параметры типа

  • T
    Настраиваемый тип свойства.

Параметры

  • propertyExpression
    Тип: System.Linq.Expressions.Expression<Func<TStructuralType, T>>
    Лямбда-выражение, представляющее свойство, которое нужно настроить. C#: t =&gt; t.MyProperty VB.Net: Function(t) t.MyProperty

Возвращаемое значение

Тип: System.Data.Entity.ModelConfiguration.Configuration.PrimitivePropertyConfiguration
Объект настройки, который можно использовать для настройки этого свойства.

См. также

Справочник

StructuralTypeConfiguration<TStructuralType> Класс

Property - перегрузка

System.Data.Entity.ModelConfiguration.Configuration - пространство имен