QueryByAttribute QueryByAttribute QueryByAttribute QueryByAttribute Class

Definition

Contains a query that is expressed as a set of attribute and value pairs.

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

Examples


//  Create query using QueryByAttribute.
QueryByAttribute querybyattribute = new QueryByAttribute("account") {
   ColumnSet = new ColumnSet("name", "address1_city", "emailaddress1"),
   Attributes.AddRange("address1_city"),
   Values.AddRange("Redmond")
};


Constructors

QueryByAttribute() QueryByAttribute() QueryByAttribute() QueryByAttribute()

Initializes a new instance of the QueryByAttribute class.

QueryByAttribute(String) QueryByAttribute(String) QueryByAttribute(String) QueryByAttribute(String)

Initializes a new instance of the QueryByAttribute class.

Properties

Attributes Attributes Attributes Attributes

Gets the set of attributes selected in the query.

ColumnSet ColumnSet ColumnSet ColumnSet

Gets or sets the column set.

EntityName EntityName EntityName EntityName

Gets or sets the logical name of the entity to query.

ExtensionData ExtensionData ExtensionData ExtensionData

Gets or sets the structure that contains extra data.

(Inherited from QueryBase)
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.

Values Values Values Values

Gets the attribute values to look for when the query is executed.

Methods

AddAttributeValue(String, Object) AddAttributeValue(String, Object) AddAttributeValue(String, Object) AddAttributeValue(String, Object)

Adds an attribute value to the attributes collection.

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

Adds an order to the orders collection.

Applies to