Share via


ODATADetailLevel.ExpandClause Property

Definition

Gets or sets the OData expand clause. Used to retrieve associated entities of the main entity being retrieved.

public string ExpandClause { get; set; }
member this.ExpandClause : string with get, set
Public Property ExpandClause As String

Property Value

Remarks

This is an optional OData $expand expression string (see the OData specification). Properties containing associated entities will be null unless included in an ExpandClause. Specifically, if you perform a List, Get or Refresh and do not specify an ExpandClause, then all associated entity properties will be null. For example, if you perform a ListPools(DetailLevel, IEnumerable<BatchClientBehavior>) operation without an ExpandClause then the Statistics property will be null. To populate the Statistics property you must supply an ExpandClause of stats. Refer to individual class documentation to find out which properties are considered associated entities.

If you specify both an ExpandClause and a SelectClause, then properties listed in the ExpandClause must be repeated in the SelectClause (because only properties listed in the SelectClause are included in the service response). (This requirement does not arise if you do not specify a SelectClause, because that means 'include all properties in the response.')

Expansions must be specified using REST API attribute names, not .NET property names.

The default is no expand expression, which means no associated objects are returned (and the corresponding properties are null).

Applies to