Skip to content

Commit e23ea2b

Browse files
authored
Merge pull request MicrosoftDocs#2588 from MicrosoftDocs/pehecke-feedback-updates
Content improvements based on customer feedback
2 parents cffb225 + ed6c0f0 commit e23ea2b

File tree

3 files changed

+31
-18
lines changed

3 files changed

+31
-18
lines changed

powerapps-docs/developer/common-data-service/org-service/use-queryexpression-class.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Use the QueryExpression class (Common Data Service) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
33
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.
44
ms.custom: ""
5-
ms.date: 10/31/2018
5+
ms.date: 04/17/2020
66
ms.reviewer: "pehecke"
77
ms.service: powerapps
88
ms.topic: "article"
@@ -21,18 +21,6 @@ In Common Data Service, you can use the <xref:Microsoft.Xrm.Sdk.Query.QueryExpre
2121

2222
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.
2323

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-
3624
<a name="record_count"></a>
3725
## Record count
3826
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)
6351
}
6452
Console.WriteLine("---------------------------------------");
6553
```
66-
54+
## Use SQL hints in a query
55+
56+
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+
6773
### See also
6874
[Building Queries with QueryExpression](build-queries-with-queryexpression.md)
6975
[Use the ColumnSet Class](use-the-columnset-class.md)

powerapps-docs/developer/common-data-service/webapi/get-started-dynamics-365-web-api-csharp.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Get started with Common Data Service Web API (C#) (Common Data Service)| Microsoft Docs"
33
description: "Learn how to access the Common Data Service Web API using the Microsoft Visual C# programming language"
44
ms.custom: ""
5-
ms.date: 1/09/2019
5+
ms.date: 03/31/2020
66
ms.service: powerapps
77
ms.suite: ""
88
ms.tgt_pltfrm: ""
@@ -29,7 +29,9 @@ After completing this guide, you will have learned enough to explore the many ot
2929

3030
## In this section
3131

32-
[Quick Start: Web API sample (C#)](quick-start-console-app-csharp.md)<br />
32+
[Quick Start: Web API sample](quick-start-console-app-csharp.md) (Do this first)
33+
[Enhanced quick start](enhanced-quick-start.md) (Do this next)
34+
[Start a Common Data Service Web API project in Visual Studio](start-web-api-project-visual-studio-csharp.md)
3335

3436
### See also
3537

powerapps-docs/developer/common-data-service/webapi/overview.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Use the Common Data Service Web API (Common Data Service)| Microsoft Docs"
33
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"
44
ms.custom: ""
5-
ms.date: 04/22/2019
5+
ms.date: 03/31/2020
66
ms.service: powerapps
77
ms.suite: ""
88
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
2828
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).
2929

3030

31-
Because the Web API is built on open standards, we dont 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/).
3232

3333
## Web API and the Organization service
3434

3535
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)
3636

3737
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.
3838

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).
3944

4045
### Related Sections
4146

0 commit comments

Comments
 (0)