共用方式為


ODATADetailLevel.SelectClause Property

Definition

Gets or sets the OData select clause. Used to retrieve only specific properties instead of all object properties.

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

Property Value

Remarks

This is an optional OData $select expression string (see the OData specification). If you provide a SelectClause, then only the properties listed in that clause are populated; other properties have their default values (typically null). For example, if you perform a ListPools(DetailLevel, IEnumerable<BatchClientBehavior>) operation with a SelectClause of id,displayName, then each CloudPool will have its Id and DisplayName properties populated, but other properties such as State will not be retrieved and therefore will have their default values (typically null).

If, when an entity was retrieved (via a List, Get or Refresh), you specifed a SelectClause which did not include the property or properties that uniquely identify the object (usually the Id property, but for Certificate the Thumbprint and ThumbprintAlgorithm properties, then any methods that access the Batch service to retrieve data or perform operations will fail. This includes most methods on the object, including Refresh(DetailLevel, IEnumerable<BatchClientBehavior>) and RefreshAsync(DetailLevel, IEnumerable<BatchClientBehavior>, CancellationToken). You can still access properties (though only properties included in the SelectClause will be populated).

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

The default is no select expression, which means all properties are returned.

Applies to