QueryOptions Class

Specifies options used to search for specific entities in the ERP system.

Namespace: powerGate.Erp.Client
Assembly: powerGate.Erp.Client.dll

Inheritance Hierarchy

System.Object
 powerGate.Erp.Client.QueryOptions

Syntax

1
public class QueryOptions

The QueryOptions type exposes the following members.

Constructors

Name

Description

../../../_images/method.ico QueryOptions()

Initializes a new instance of the QueryOptions class.

Properties

Type

Name

Description

../../../_images/prop.ico IEnumerable<string>

Expand

Name/s of navigation properties which should be included.
Navigation properties nested inside a complex type property can also be expanded by specifying the full path (e.g. ComplexTypeProperty/NavigationProperty).

../../../_images/prop.ico string

Filter

The OData filter which will be executed.

../../../_images/prop.ico IEnumerable<OrderBy>

OrderBy

The order of the Item’s. They can be ordered by the property name and/or direction.

../../../_images/prop.ico IEnumerable<string>

Select

Name/s of any properties which should explicitly be requested and returned.

../../../_images/prop.ico int

Top

The amount of items which should be returned.

Remarks

The Filter property allows you to specify the filter criteria in OData syntax. More informations about the OData Filter syntax can be found here. The OrderBy property allows you to order the entities by property name and/or direction (Ascending or Descending).

  • If an OrderBy object only specifies the property name, the entities are ordered ascending by that property.

  • If an OrderBy object specifies a property name and direction, the entities are ordered by the passed property name and direction.

  • If multiple OrderBy objects are specified, the entities can be ordered by multiple properties in the specified direction.

The Select property lets you receive only those properties which you want to have in the results.

Depending on the entity model in the ERP system, entities may contain multiple hierarchical levels.
Unlike complex type properties, the navigation properties are not returned by default. To include them in the results, explicitly specify them using the Expand property.
Complex type properties themselves cannot be expanded and do not need to be, since they are always returned by default together with the entity’s other properties.
However, a complex type property may itself contain a navigation property. In that case, the navigation property can still be expanded by specifying the path through the complex type property (e.g. Expand = new[] { "ComplexTypeProperty/NavigationProperty" }).

See also

Reference