-
Notifications
You must be signed in to change notification settings - Fork 1
Query Extensions
Artem Grunin edited this page May 16, 2023
·
7 revisions
Extensions for Microsoft.Xrm.Sdk.Query types.
Introduced in version 2.0.0
Universal method to get Query page number (FetchXML is supported).
public int GetPageNumber();
Introduced in version 1.0.38
Universal method to set Query paging parameters to next page.
public void NextPage(string pagingCookie);
Introduced in version 1.2.0
Reflection is used to get entity or attribute logical name since version 1.3.0.
Logical names are cached to provide better performance
A set of extension methods and classes to support some expression-style techniques while using QueryExpression/QueryByAttribute classes.
QueryExpression query = new QueryExpression()
{
ColumnSet = new ColumnSet<Account>(a => a.AccountNumber, a => a.Name),
Criteria = new FilterExpression()
{
Conditions =
{
new ConditionExpression<Account>(a=> a.Name, ConditionOperator.BeginsWith, "Demo")
}
},
Orders =
{
new OrderExpression<Account>(a=> a.AccountNumber, OrderType.Ascending)
}
};
See blog post for details.