Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Models Inheritance: System.Object

Syntax

Summary

Represents a complex type in an OData model.

Remarks

Complex types are structured types that consist of a set of properties but do not have a key. They are used to define reusable data structures that can be used as property types in entity types or other complex types. Complex types cannot exist independently; they must be contained within an entity or another complex type.

Constructors

.ctor

Initializes a new instance of the EdmComplexType class.

Syntax

.ctor

Initializes a new instance of the EdmComplexType class with the specified name and namespace.

Syntax

Parameters

Exceptions

.ctor Inherited

Inherited from object

Syntax

Properties

Abstract

Gets or sets a value indicating whether this complex type is abstract.

Syntax

Property Value

Type: bool true if the complex type is abstract; otherwise, false.

Remarks

Abstract complex types cannot be instantiated directly but can serve as base types for other complex types. They are useful for defining common properties and behaviors.

BaseType

Gets or sets the base type of the complex type.

Syntax

Property Value

Type: string? The fully qualified name of the base complex type, or null if this type has no base type.

Remarks

When specified, this complex type inherits all properties from the base type. The inheritance hierarchy must be consistent within the model.

FullName

Gets the fully qualified name of the complex type.

Syntax

Property Value

Type: string The namespace and name combined with a dot separator.

HasBaseType

Gets a value indicating whether this complex type inherits from another complex type.

Syntax

Property Value

Type: bool true if the complex type has a base type; otherwise, false.

HasNavigationProperties

Gets a value indicating whether this complex type has any navigation properties.

Syntax

Property Value

Type: bool true if the complex type has navigation properties; otherwise, false.

IsAbstract

Gets a value indicating whether this complex type is abstract.

Syntax

Property Value

Type: bool true if the complex type is abstract; otherwise, false.

Remarks

This is an alias for the EdmComplexType.Abstract property for compatibility.

Name

Gets or sets the name of the complex type.

Syntax

Property Value

Type: string The local name of the complex type within its namespace.

Namespace

Gets or sets the namespace of the complex type.

Syntax

Property Value

Type: string The namespace that contains this complex type. Gets or sets the navigation properties of the complex type.

Syntax

Property Value

Type: System.Collections.Generic.List<Microsoft.OData.Mcp.Core.Models.EdmNavigationProperty> A collection of navigation properties that define relationships to entities.

Remarks

Navigation properties in complex types enable navigation from the complex type to related entities, but the complex type itself cannot be the target of navigation.

OpenType

Gets or sets a value indicating whether this complex type is open.

Syntax

Property Value

Type: bool true if the complex type is open; otherwise, false.

Remarks

Open complex types allow additional properties beyond those explicitly defined in the metadata. This provides flexibility for dynamic scenarios where the complete structure may not be known at design time.

Properties

Gets or sets the properties of the complex type.

Syntax

Property Value

Type: System.Collections.Generic.List<Microsoft.OData.Mcp.Core.Models.EdmProperty> A collection of structural properties that define the data elements of the complex type.

Remarks

These properties represent the data that can be stored and retrieved for instances of this complex type. Unlike entity types, complex types do not have key properties.

Methods

Equals Override

Determines whether the specified object is equal to the current complex type.

Syntax

Parameters

Returns

Type: bool true if the specified object is equal to the current complex type; otherwise, false.

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Override

Returns a hash code for the current complex type.

Syntax

Returns

Type: int A hash code for the current complex type.

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetNavigationProperty

Gets a navigation property by name.

Syntax

Parameters

Returns

Type: Microsoft.OData.Mcp.Core.Models.EdmNavigationProperty? The navigation property with the specified name, or null if not found.

GetProperty

Gets a property by name.

Syntax

Parameters

Returns

Type: Microsoft.OData.Mcp.Core.Models.EdmProperty? The property with the specified name, or null if not found.

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

HasNavigationProperty

Determines whether the complex type has a navigation property with the specified name.

Syntax

Parameters

Returns

Type: bool true if the complex type has the navigation property; otherwise, false.

HasProperty

Determines whether the complex type has a property with the specified name.

Syntax

Parameters

Returns

Type: bool true if the complex type has the property; otherwise, false.

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Override

Returns a string representation of the complex type.

Syntax

Returns

Type: string The fully qualified name of the complex type.

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?