DataServiceQuery<TElement>.Expand Method

Definition

Overloads

Expand(String)

Expands a query to include entities from a related entity set in the query response.

Expand<TTarget>(Expression<Func<TElement,TTarget>>)

Expands a query to include entities from a related entity set in the query response, where the related entity is of a specific type in a type hierarchy.

Expand(String)

Expands a query to include entities from a related entity set in the query response.

public virtual Microsoft.OData.Client.DataServiceQuery<TElement> Expand (string path);
abstract member Expand : string -> Microsoft.OData.Client.DataServiceQuery<'Element>
override this.Expand : string -> Microsoft.OData.Client.DataServiceQuery<'Element>
Public Overridable Function Expand (path As String) As DataServiceQuery(Of TElement)

Parameters

path
String

The expand path in the format Orders/Order_Details.

Returns

A new query that includes the requested $expand query option appended to the URI of the supplied query.

Applies to

Expand<TTarget>(Expression<Func<TElement,TTarget>>)

Expands a query to include entities from a related entity set in the query response, where the related entity is of a specific type in a type hierarchy.

public virtual Microsoft.OData.Client.DataServiceQuery<TElement> Expand<TTarget> (System.Linq.Expressions.Expression<Func<TElement,TTarget>> navigationPropertyAccessor);
abstract member Expand : System.Linq.Expressions.Expression<Func<'Element, 'arget>> -> Microsoft.OData.Client.DataServiceQuery<'Element>
override this.Expand : System.Linq.Expressions.Expression<Func<'Element, 'arget>> -> Microsoft.OData.Client.DataServiceQuery<'Element>
Public Overridable Function Expand(Of TTarget) (navigationPropertyAccessor As Expression(Of Func(Of TElement, TTarget))) As DataServiceQuery(Of TElement)

Type Parameters

TTarget

Target type of the last property on the expand path.

Parameters

navigationPropertyAccessor
Expression<Func<TElement,TTarget>>

A lambda expression that indicates the navigation property that returns the entity set to include in the expanded query.

Returns

Returns a DataServiceQuery<TElement> that with the expand option included.

Applies to