You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/developer/common-data-service/org-service/use-queryexpression-class.md
+20-14Lines changed: 20 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Use the QueryExpression class (Common Data Service) | Microsoft Docs"# Intent and product brand in a unique string of 43-59 chars including spaces
3
3
description: "Use the QueryExpression class to build complex queries for use with the IOrganizationService.QueryBase) method or the RetrieveMultipleRequest message"# 115-145 characters including spaces. This abstract displays in the search result.
4
4
ms.custom: ""
5
-
ms.date: 10/31/2018
5
+
ms.date: 04/17/2020
6
6
ms.reviewer: "pehecke"
7
7
ms.service: powerapps
8
8
ms.topic: "article"
@@ -21,18 +21,6 @@ In Common Data Service, you can use the <xref:Microsoft.Xrm.Sdk.Query.QueryExpre
21
21
22
22
The <xref:Microsoft.Xrm.Sdk.Query.QueryExpression> class lets you create complex queries. The <xref:Microsoft.Xrm.Sdk.Query.QueryByAttribute> class is designed to be a simple way to search for entities where attributes match specified values.
23
23
24
-
The following table lists the properties that you set to create a query expression.
25
-
26
-
|Property|Description|
27
-
|--------------|-----------------|
28
-
|<xref:Microsoft.Xrm.Sdk.Query.QueryExpression.EntityName>|Specifies which type of entity will be retrieved. A query expression can only retrieve a collection of one entity type.|
29
-
|<xref:Microsoft.Xrm.Sdk.Query.QueryExpression.ColumnSet>|Specifies the set of attributes (columns) to retrieve.|
30
-
|<xref:Microsoft.Xrm.Sdk.Query.QueryExpression.Criteria>|Specifies complex conditional and logical filter expressions that filter the results of the query.|
31
-
|<xref:Microsoft.Xrm.Sdk.Query.QueryExpression.Distinct>|Specifies whether the results of the query contain duplicate records.|
32
-
|<xref:Microsoft.Xrm.Sdk.Query.QueryExpression.LinkEntities>|Specifies the links between multiple entity types.|
33
-
|<xref:Microsoft.Xrm.Sdk.Query.QueryExpression.Orders>|Specifies the order in which the records are returned from the query.|
34
-
|<xref:Microsoft.Xrm.Sdk.Query.QueryExpression.PageInfo>|Specifies the number of pages and the number of records per page returned from the query.|
35
-
36
24
<aname="record_count"></a>
37
25
## Record count
38
26
To find out how many records the query returned, set the <xref:Microsoft.Xrm.Sdk.Query.PagingInfo.ReturnTotalRecordCount> property to true before executing the query. When you do this, the <xref:Microsoft.Xrm.Sdk.EntityCollection.TotalRecordCount> will be set. Otherwise, this value will be -1.
@@ -63,7 +51,25 @@ foreach (var a in result1.Entities)
The <xref:Microsoft.Xrm.Sdk.Query.QueryExpression> class contains a property named <xref:Microsoft.Xrm.Sdk.Query.QueryExpression.QueryHints>. By setting this property to one of the supported string values shown below, you can provide a hint for generated SQL text which affects the query's execution.
57
+
58
+
|QueryHint value | SQL Query Option and Hint |
59
+
|---------|---------|
60
+
|OptimizeForUnknown | Optimize For Unknown|
61
+
|ForceOrder | Force Order |
62
+
|Recompile | Recompile |
63
+
|DisableRowGoal | use hint(‘Disable_Optimizer_RowGoal’) |
64
+
|EnableOptimizerHotfixes | use hint('ENABLE_QUERY_OPTIMIZER_HOTFIXES') |
65
+
|LoopJoin | Loop Join |
66
+
|MergeJoin | Merge Join |
67
+
|HashJoin | Hash Join |
68
+
|NO_PERFORMANCE_SPOOL | NO_PERFORMANCE_SPOOL |
69
+
|MaxRecursion | MAXRECURSION number |
70
+
71
+
More information: [Hints (Transact-SQL) - Query](https://docs.microsoft.com/sql/t-sql/queries/hints-transact-sql-query)
72
+
67
73
### See also
68
74
[Building Queries with QueryExpression](build-queries-with-queryexpression.md)
69
75
[Use the ColumnSet Class](use-the-columnset-class.md)
Copy file name to clipboardExpand all lines: powerapps-docs/developer/common-data-service/webapi/overview.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Use the Common Data Service Web API (Common Data Service)| Microsoft Docs"
3
3
description: "The Common Data Service Web API implements OData v4 and provides a development experience that can be used across a wide variety of programming languages, platforms, and devices"
4
4
ms.custom: ""
5
-
ms.date: 04/22/2019
5
+
ms.date: 03/31/2020
6
6
ms.service: powerapps
7
7
ms.suite: ""
8
8
ms.tgt_pltfrm: ""
@@ -28,14 +28,19 @@ The Web API is one of two web services you can use to work with data and metadat
28
28
The Common Data Service Web API provides a development experience that can be used across a wide variety of programming languages, platforms, and devices. The Web API implements the OData (Open Data Protocol), version 4.0, an OASIS standard for building and consuming RESTful APIs over rich data sources. You can learn more about this protocol at [https://www.odata.org/](https://www.odata.org/). Details about this standard are available at [https://www.oasis-open.org/standards#odatav4.0](https://www.oasis-open.org/standards#odatav4.0).
29
29
30
30
31
-
Because the Web API is built on open standards, we don’t provide assemblies for a specific developer experience. You can compose HTTP requests for specific operations or use third-party libraries to generate classes for whatever language or platform you want. You can find a list of libraries that support OData version 4.0 at [https://www.odata.org/libraries/](https://www.odata.org/libraries/).
31
+
Because the Web API is built on open standards, we don't provide assemblies for a specific developer experience. You can compose HTTP requests for specific operations or use third-party libraries to generate classes for whatever language or platform you want. You can find a list of libraries that support OData version 4.0 at [https://www.odata.org/libraries/](https://www.odata.org/libraries/).
32
32
33
33
## Web API and the Organization service
34
34
35
35
It is valuable to recognize that the organization service is what defines the platform. The Web API provides a RESTful programming experience but ultimately all data operations go through the underlying organization service. The organization service defines the supported operations as messages. Each message has a name. These names are bound to the events used in the event framework to evaluate what registered extensions should be initiated. More information: [Event Framework](../event-framework.md)
36
36
37
37
The Web API allows you to do all the same operations as the organization service but presents them in an RESTful style. OData v4 provides for named operations via *functions* or *actions*. Most messages available in the organization service are exposed as a corresponding named function or action. Those messages that correspond to CRUD operations are not available in the Web API because as a RESTful service they have implementations using GET, POST, PATCH, and DELETE HTTP methods, but within the platform the *retrieve*, *create*, *update*, and *delete* messages are invoked just as they are when the corresponding operations are performed using the .NET Framework assemblies.
38
38
39
+
## Getting started
40
+
41
+
Now that you have read an overview of the Web API, proceed to the [Get started with Common Data Service Web API](get-started-dynamics-365-web-api-csharp.md) topic to learn how to write your first C# program in Visual Studio that uses the Web API.
42
+
43
+
If you are a JavaScript developer and want to use the Web API in model-driven apps, navigate to [Client-side JavaScript using Web API in model-driven apps](get-started-web-api-client-side-javascript.md).
0 commit comments