DataServiceQuerySingle<TElement>.Expand Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 entity 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.DataServiceQuerySingle<TElement> Expand (string path);
abstract member Expand : string -> Microsoft.OData.Client.DataServiceQuerySingle<'Element>
override this.Expand : string -> Microsoft.OData.Client.DataServiceQuerySingle<'Element>
Public Overridable Function Expand (path As String) As DataServiceQuerySingle(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 entity from a related entity set in the query response, where the related entity is of a specific type in a type hierarchy.
public Microsoft.OData.Client.DataServiceQuerySingle<TElement> Expand<TTarget> (System.Linq.Expressions.Expression<Func<TElement,TTarget>> navigationPropertyAccessor);
member this.Expand : System.Linq.Expressions.Expression<Func<'Element, 'arget>> -> Microsoft.OData.Client.DataServiceQuerySingle<'Element>
Public Function Expand(Of TTarget) (navigationPropertyAccessor As Expression(Of Func(Of TElement, TTarget))) As DataServiceQuerySingle(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 DataServiceQuerySingle<TElement> that with the expand option included.