共用方式為


DbComplexPropertyEntry<TEntity, TComplexProperty> 類別

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

此類別的執行個體會從 DbEntityEntry<TEntity> 的 ComplexProperty 方法傳回,並允許存取複雜屬性的狀態。

繼承階層

System.Object
  System.Data.Entity.Infrastructure.DbMemberEntry<TEntity, TComplexProperty>
    System.Data.Entity.Infrastructure.DbPropertyEntry<TEntity, TComplexProperty>
      System.Data.Entity.Infrastructure.DbComplexPropertyEntry<TEntity, TComplexProperty>

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

語法

'宣告
Public Class DbComplexPropertyEntry(Of TEntity As Class, TComplexProperty) _
    Inherits DbPropertyEntry(Of TEntity, TComplexProperty)
'用途
Dim instance As DbComplexPropertyEntry(Of TEntity, TComplexProperty)
public class DbComplexPropertyEntry<TEntity, TComplexProperty> : DbPropertyEntry<TEntity, TComplexProperty>
where TEntity : class
generic<typename TEntity, typename TComplexProperty>
where TEntity : ref class 
public ref class DbComplexPropertyEntry : public DbPropertyEntry<TEntity, TComplexProperty>
type DbComplexPropertyEntry<'TEntity, 'TComplexProperty when 'TEntity : not struct> =  
    class 
        inherit DbPropertyEntry<'TEntity, 'TComplexProperty>
    end
JScript does not support generic types and methods.

類型參數

  • TEntity
    此屬性所屬之實體的類型。
  • TComplexProperty
    此屬性的類型。

DbComplexPropertyEntry<TEntity, TComplexProperty> 類型會公開下列成員。

屬性

  名稱 描述
公用屬性 CurrentValue 取得或設定此屬性的目前值。 (繼承自 DbPropertyEntry<TEntity, TProperty>)。
公用屬性 EntityEntry 此屬性所屬的 DbEntityEntry<TEntity>。 (繼承自 DbPropertyEntry<TEntity, TProperty>)。
公用屬性 IsModified 取得或設定值,指出此屬性的值從資料庫載入之後是否已修改。 (繼承自 DbPropertyEntry<TEntity, TProperty>)。
公用屬性 Name 取得屬性名稱。 (繼承自 DbPropertyEntry<TEntity, TProperty>)。
公用屬性 OriginalValue 取得或設定此屬性的原始值。 (繼承自 DbPropertyEntry<TEntity, TProperty>)。
公用屬性 ParentProperty 屬於巢狀屬性之屬性的 DbPropertyEntry。此方法只會針對複雜物件的屬性傳回非 null 項目,否則它會針對實體本身的屬性傳回 null。 (繼承自 DbPropertyEntry<TEntity, TProperty>)。

靠上

方法

  名稱 描述
公用方法 ComplexProperty(String) 取得代表此屬性之巢狀複雜屬性的物件。
公用方法 ComplexProperty<TNestedComplexProperty>(Expression<Func<TComplexProperty, TNestedComplexProperty>>) 取得代表此屬性之巢狀複雜屬性的物件。
公用方法 ComplexProperty<TNestedComplexProperty>(String) 取得代表此屬性之巢狀複雜屬性的物件。
公用方法 Equals 指定此物件是否等於指定的物件。 (繼承自 DbMemberEntry<TEntity, TProperty>)。
受保護的方法 Finalize (繼承自 Object)。
公用方法 GetHashCode 取得與此物件相關聯的雜湊碼。 (繼承自 DbMemberEntry<TEntity, TProperty>)。
公用方法 GetType 取得目前執行個體的 Type。 (繼承自 DbMemberEntry<TEntity, TProperty>)。
公用方法 GetValidationErrors 驗證此屬性。 (繼承自 DbMemberEntry<TEntity, TProperty>)。
受保護的方法 MemberwiseClone (繼承自 Object)。
公用方法 Property(String) 取得代表此屬性之巢狀屬性的物件。此方法可用於純量屬性或複雜屬性。
公用方法 Property<TNestedProperty>(Expression<Func<TComplexProperty, TNestedProperty>>) 取得代表此屬性之巢狀屬性的物件。此方法可用於純量屬性或複雜屬性。
公用方法 Property<TNestedProperty>(String) 取得代表此屬性之巢狀屬性的物件。此方法可用於純量屬性或複雜屬性。
公用方法 ToString 傳回 DbMemberEntry<TEntity, TProperty> 的字串表示法。 (繼承自 DbMemberEntry<TEntity, TProperty>)。

靠上

運算子

  名稱 描述
公用運算子靜態成員 Implicit(DbComplexPropertyEntry<TEntity, TComplexProperty> to DbComplexPropertyEntry) 針對此物件所表示的屬性傳回非泛型 DbComplexPropertyEntry 類別的新執行個體。

靠上

執行緒安全

這個類型的任何 Public static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。並非所有的執行個體成員都是安全執行緒。

請參閱

參考

System.Data.Entity.Infrastructure 命名空間