Export (0) Print
Expand All

ComplexObject Class

Base class for complex types.

System::Object
  System.Data.Objects.DataClasses::StructuralObject
    System.Data.Objects.DataClasses::ComplexObject

Namespace:  System.Data.Objects.DataClasses
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

[SerializableAttribute]
[DataContractAttribute(IsReference = true)]
public ref class ComplexObject abstract : public StructuralObject

The ComplexObject type exposes the following members.

  NameDescription
Protected methodComplexObjectCreates an instance of ComplexObject.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodGetValidValue<T>(T, String, Boolean, Boolean)Returns a complex type for the specified property. (Inherited from StructuralObject.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnPropertyChangedRaises the PropertyChanged event. (Inherited from StructuralObject.)
Protected methodOnPropertyChangingRaises the PropertyChanging event. (Inherited from StructuralObject.)
Protected methodReportPropertyChangedNotifies the change tracker that a property of a complex object has changed. (Overrides StructuralObject::ReportPropertyChanged(String).)
Protected methodReportPropertyChangingNotifies the change tracker that a property change is pending on a complex object. (Overrides StructuralObject::ReportPropertyChanging(String).)
Protected methodSetValidValue<T>(T, T, String)Sets a complex object for the specified property. (Inherited from StructuralObject.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public eventPropertyChangedOccurs when a property value has changed. (Inherited from StructuralObject.)
Public eventPropertyChangingOccurs when a property value change is a pending. (Inherited from StructuralObject.)
Top

ComplexObject implements the basic functionality for complex types. For more information, see Complex Type Objects (Entity Framework).

When implementing custom data classes with a conceptual model, we recommend that your data classes that represent complex types inherit from ComplexObject. For more information, see Customizing Objects (Entity Framework).

A complex type can be a property of an entity type or of another complex type.

Complex types are returned by non-scalar properties of entity types. This enables scalar properties to be organized within entities. Like entities, complex types consist of scalar properties or other complex type properties. A complex type cannot be used without an associated entity type. Because complex types do not have keys, complex type objects cannot be managed without an associated entity type. For more information, see Complex Type Objects (Entity Framework).

In the following example, the custom data class OrderInfo inherits from ComplexObject and is mapped to the OrderInfo complex type defined in the conceptual model.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5, 4, 3.5 SP1

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft