語言

EntityKey 類別

定義

一個實體的識別碼。

[System.Diagnostics.DebuggerDisplay("{ConcatKeyValue()}")]
[System.Runtime.Serialization.DataContract(IsReference=true)]
[System.Serializable]
public sealed class EntityKey : IEquatable<System.Data.Entity.Core.EntityKey>
type EntityKey = class
    interface IEquatable<EntityKey>
Public NotInheritable Class EntityKey
Implements IEquatable(Of EntityKey)
繼承
EntityKey
屬性
實作

建構函式

名稱 Description
EntityKey()

初始化 EntityKey 類別的新執行個體。

EntityKey(String, IEnumerable<EntityKeyMember>)

初始化一個帶有實體集合名稱及EntityKey物件集合IEnumerable<T>的新類別實例EntityKeyMember。

EntityKey(String, IEnumerable<KeyValuePair<String,Object>>)

初始化一個帶有實體集合名稱及通用EntityKey集合的新類別實例KeyValuePair。

EntityKey(String, String, Object)

初始化一個帶有實體集合名稱及特定實體鍵對的新類別實例 EntityKey 。

屬性

名稱 Description
EntityContainerName

取得或設定實體容器的名稱。

EntityKeyValues

取得或設定與此 EntityKey相關的關鍵值。

EntityNotValidKey

取得一個單例 EntityKey,識別因 TREAT 失敗而產生的實體。

EntitySetName

取得或設定實體集合的名稱。

IsTemporary

會得到一個表示是否 EntityKey 暫時的值。

NoEntitySetKey

取得一個單例 EntityKey,用來識別唯讀實體。

方法

名稱 Description
Equals(EntityKey)

回傳一個值,表示此實例是否等於指定的 EntityKey 。

Equals(Object)

傳回值,這個值表示這個實例是否等於指定的物件。

GetEntitySet(MetadataWorkspace)

從給定的元資料工作區取得該實體金鑰的實體設定。

GetHashCode()

作為當前 EntityKey 物件的雜湊函數。 GetHashCode() 適用於雜湊演算法與資料結構,例如雜湊表。

OnDeserialized(StreamingContext)

輔助方法用於反序列化。EntityKey

OnDeserializing(StreamingContext)

輔助方法用於反序列化。EntityKey

運算子

名稱 Description
Equality(EntityKey, EntityKey)

比較兩個 EntityKey 物件。

Inequality(EntityKey, EntityKey)

比較兩個 EntityKey 物件。

適用於