ComplexObject Class

 

Base class for complex types.

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

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

[<AbstractClass>]
[<SerializableAttribute>]
[<DataContractAttribute(IsReference = true)>]
type ComplexObject = 
    class
        inherit StructuralObject
    end

NameDescription
System_CAPS_protmethodComplexObject()

Creates an instance of ComplexObject.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodGetValidValue<'T>('T, String, Boolean, Boolean)

Returns a complex type for the specified property.(Inherited from StructuralObject.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnPropertyChanged(String)

Raises the PropertyChanged event.(Inherited from StructuralObject.)

System_CAPS_protmethodOnPropertyChanging(String)

Raises the PropertyChanging event.(Inherited from StructuralObject.)

System_CAPS_protmethodReportPropertyChanged(String)

Notifies the change tracker that a property of a complex object has changed.(Overrides StructuralObject.ReportPropertyChanged(String).)

System_CAPS_protmethodReportPropertyChanging(String)

Notifies the change tracker that a property change is pending on a complex object.(Overrides StructuralObject.ReportPropertyChanging(String).)

System_CAPS_protmethodSetValidValue<'T>('T, 'T, String)

Sets a complex object for the specified property.(Inherited from StructuralObject.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubeventPropertyChanged

Occurs when a property value has changed.(Inherited from StructuralObject.)

System_CAPS_pubeventPropertyChanging

Occurs when a property value change is a pending.(Inherited from StructuralObject.)

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

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.

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.

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
Available since 3.5

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

System.Data.Objects.DataClasses Namespace
How to: Define a Model with Complex Types (Entity Framework)
How to: Execute a Query that Returns Complex Types
How to: Add and Modify Objects with Complex Types (Entity Framework)

Return to top
Show: