LINQ queries demonstrate how to operate and query the Dynamics 365 Sales objects wrapped in an Entity Framework data model. Below are some examples of LINQ queries supported by the Entity framework.
Contains
Retrieve records from the Contracts table where the title containdscontains "con". |
| ||||
Count
Count all entities that match a given criterion. |
| ||||
Filter
Select records from the Contracts table that belong to Title equal to "AGR-04". |
| ||||
Group by
Group records from the Accounts table based on the Accountnumber property. The groups are then ordered in descending order based on the Accountnumber. |
| ||||
Join
Join the tables Contracts and Accounts. |
| ||||
Limit
Select the first 10 records. |
| ||||
Order By
Sort records by Name in descending order. |
|