ConventionPrimitivePropertyConfiguration.IsKey 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
將此屬性設定為實體類型之主索引鍵的一部分。
命名空間: System.Data.Entity.ModelConfiguration.Configuration
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Public Overridable Function IsKey As ConventionPrimitivePropertyConfiguration
'用途
Dim instance As ConventionPrimitivePropertyConfiguration
Dim returnValue As ConventionPrimitivePropertyConfiguration
returnValue = instance.IsKey()
public virtual ConventionPrimitivePropertyConfiguration IsKey()
public:
virtual ConventionPrimitivePropertyConfiguration^ IsKey()
abstract IsKey : unit -> ConventionPrimitivePropertyConfiguration
override IsKey : unit -> ConventionPrimitivePropertyConfiguration
public function IsKey() : ConventionPrimitivePropertyConfiguration
傳回值
類型:System.Data.Entity.ModelConfiguration.Configuration.ConventionPrimitivePropertyConfiguration
可以鏈結多個呼叫的相同 ConventionPrimitivePropertyConfiguration 執行個體。