QueryExpression QueryExpression QueryExpression QueryExpression Class

Definition

Contains a complex query expressed in a hierarchy of expressions.

public ref class QueryExpression sealed : Microsoft::Xrm::Sdk::Query::QueryBase
[System.Runtime.Serialization.DataContract(Name="QueryExpression", Namespace="http://schemas.microsoft.com/xrm/2011/Contracts")]
public sealed class QueryExpression : Microsoft.Xrm.Sdk.Query.QueryBase
type QueryExpression = class
    inherit QueryBase
Public NotInheritable Class QueryExpression
Inherits QueryBase
Inheritance
QueryExpressionQueryExpressionQueryExpressionQueryExpression
Attributes

Examples

Query#RetrieveMultipleConditionOperatorsQE1

Remarks

QueryExpression provides an object model to construct a query. Queries can also be created using FetchXML, a proprietary XML based query language. You can convert queries between FetchXML and QueryExpression using FetchXmlToQueryExpressionRequest and QueryExpressionToFetchXmlRequest messages. More information: Sample: Convert queries between Fetch and QueryExpression.

Constructors

QueryExpression() QueryExpression() QueryExpression() QueryExpression()

Initializes a new instance of the QueryExpression class.

QueryExpression(String) QueryExpression(String) QueryExpression(String) QueryExpression(String)

Initializes a new instance of the QueryExpression class setting the entity name.

Fields

Empty Empty Empty Empty

Properties

ColumnSet ColumnSet ColumnSet ColumnSet

Gets or sets the columns to include.

Criteria Criteria Criteria Criteria

Gets or sets the complex condition and logical filter expressions that filter the results of the query.

Distinct Distinct Distinct Distinct

Gets or sets whether the results of the query contain duplicate entity instances.

EntityName EntityName EntityName EntityName

Gets or sets the logical name of the entity.

ExtensionData ExtensionData ExtensionData ExtensionData

Gets or sets the structure that contains extra data.

(Inherited from QueryBase)
LinkEntities LinkEntities LinkEntities LinkEntities

Gets a collection of the links between multiple entity types.

NoLock NoLock NoLock NoLock

Gets or sets a value that indicates that no shared locks are issued against the data that would prohibit other transactions from modifying the data in the records returned from the query.

Orders Orders Orders Orders

Gets the order in which the entity instances are returned from the query.

PageInfo PageInfo PageInfo PageInfo

Gets or sets the number of pages and the number of entity instances per page returned from the query.

TopCount TopCount TopCount TopCount

Gets or sets the number of rows to be returned.

Methods

Accept(IQueryExpressionVisitor) Accept(IQueryExpressionVisitor) Accept(IQueryExpressionVisitor) Accept(IQueryExpressionVisitor)
AddLink(String, String, String) AddLink(String, String, String) AddLink(String, String, String) AddLink(String, String, String)

Adds the specified link to the query expression setting the entity name to link to, the attribute name to link from and the attribute name to link to.

AddLink(String, String, String, JoinOperator) AddLink(String, String, String, JoinOperator) AddLink(String, String, String, JoinOperator) AddLink(String, String, String, JoinOperator)

Adds the specified link to the query expression setting the entity name to link to, the attribute name to link from and the attribute name to link to.

AddOrder(String, OrderType) AddOrder(String, OrderType) AddOrder(String, OrderType) AddOrder(String, OrderType)

Adds the specified order expression to the query expression.

Applies to