Build queries with LINQ (.NET language-integrated query)

Applies To: CRM 2015 on-prem, CRM Online

You can use .NET Pertanyaan Bersepadu Bahasa (LINQ) to write queries in Microsoft Dynamics CRM 2015 dan Microsoft Dynamics CRM Online 2015 Kemaskini. You can use the OrganizationServiceContext class or a deriving class created by the CrmSvcUtil tool to write LINQ queries that access the SOAP endpoint (Organization.svc). The OrganizationServiceContext class contains an underlying LINQ query provider that translates LINQ queries from Microsoft Visual C# or Microsoft Visual Basic .NET syntax into the query API used by Microsoft Dynamics CRM.

When you use early-bound programming classes you can generate a class derived from the OrganizationServiceContext class if you specify the name of the class using the servicecontextname parameter when using the Code Generation Tool (CrmSvcUtil.exe). Use of this class allows for referencing an IQueryable entity set using the pattern <entity schema name>+Set, for example AccountSet to reference the collection of Account entity records. All samples in the Microsoft Dynamics CRM SDK use ServiceContext as the name for this class but your code may use a different name. Maklumat lanjut: Create early bound entity classes with the code generation tool (CrmSvcUtil.exe)

Dalam Bahagian Ini

Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.