StructuralTypeConfiguration<TStructuralType>.Property 方法 (Expression<Func<TStructuralType, DateTime>>)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
設定在此類型上定義的 DateTime 屬性。
命名空間: System.Data.Entity.ModelConfiguration.Configuration
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")> _
<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")> _
Public Function Property ( _
propertyExpression As Expression(Of Func(Of TStructuralType, DateTime)) _
) As DateTimePropertyConfiguration
'用途
Dim instance As StructuralTypeConfiguration
Dim propertyExpression As Expression(Of Func(Of TStructuralType, DateTime))
Dim returnValue As DateTimePropertyConfiguration
returnValue = instance.Property(propertyExpression)
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public DateTimePropertyConfiguration Property(
Expression<Func<TStructuralType, DateTime>> propertyExpression
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1011:ConsiderPassingBaseTypesAsParameters")]
public:
DateTimePropertyConfiguration^ Property(
Expression<Func<TStructuralType, DateTime>^>^ propertyExpression
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")>]
[<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")>]
member Property :
propertyExpression:Expression<Func<'TStructuralType, DateTime>> -> DateTimePropertyConfiguration
public function Property(
propertyExpression : Expression<Func<TStructuralType, DateTime>>
) : DateTimePropertyConfiguration
參數
- propertyExpression
類型:System.Linq.Expressions.Expression<Func<TStructuralType, DateTime>>
Lambda 運算式,表示要設定的屬性。 C#:t => t.MyProperty VB.Net:Function(t) t.MyProperty
傳回值
類型:System.Data.Entity.ModelConfiguration.Configuration.DateTimePropertyConfiguration
可用來設定此屬性的組態物件。