Skip to content

Linq query selecting only Id requests all columns from CDS  #69

Open
@filcole

Description

@filcole

The following Linq query will return all columns from CDS, I'd only expect the Id column to be returned.

                Guid accountId = (from a in context.AccountSet
                                  where a.Name.Equals("Wonka Chocolate Factory")
                                  select a.Id).FirstOrDefault();

This occurs with latest versions of both clients:

  • Microsoft.PowerPlatform.Cds.Client, Version 0.2.31-Alpha
  • Microsoft.CrmSdk.XrmTooling.CoreAssembly, Version 9.1.0.51

Request:
image

Response:
image

The following query does not return all columns from CDS.

                Guid? accountId = (from a in context.AccountSet
                                   where a.Name.Equals("Wonka Chocolate Factory")
                                   select a.AccountId).FirstOrDefault();

Request:
image

Response:
image

To eliminate the cause being the Early Bound Generator in XrmToolbox I tested again with classes generated by CrmSvcUtil and received the same result.

Test code used for CrmServiceClient, CdsServiceClient and CdsServiceClientWithOOTBCrmSvcUtil are here: https://github.com/filcole/LinqDriverTest

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions