共用方式為


DbModelBuilder.Properties<T> 方法

[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]

開始組態輕量型慣例以套用至模型中指定之類型的所有基本屬性。

命名空間:  System.Data.Entity
組件:  EntityFramework (在 EntityFramework.dll 中)

語法

'宣告
<SuppressMessageAttribute("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")> _
Public Function Properties(Of T) As PropertyConventionConfiguration
'用途
Dim instance As DbModelBuilder 
Dim returnValue As PropertyConventionConfiguration 

returnValue = instance.Properties()
[SuppressMessageAttribute("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
public PropertyConventionConfiguration Properties<T>()
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1004:GenericMethodsShouldProvideTypeParameter")]
public:
generic<typename T>
PropertyConventionConfiguration^ Properties()
[<SuppressMessageAttribute("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")>]
member Properties : unit -> PropertyConventionConfiguration
JScript does not support generic types and methods.

類型參數

  • T
    將要套用此慣例的屬性所屬類型。

傳回值

類型:System.Data.Entity.ModelConfiguration.Configuration.PropertyConventionConfiguration
慣例的組態物件。

備註

慣例會套用至屬於指定之類型的可為 Null 和不可為 Null 屬性。

請參閱

參考

DbModelBuilder 類別

Properties 多載

System.Data.Entity 命名空間