Linq To xRM Issue(CRM 4.0 Online): The 'select' and 'orderBy' calls may only reference a single common entity type.

本文通过一个具体的示例介绍了如何利用新的Microsoft xRM SDK来提高开发效率。作者展示了如何从不同的实体(如账户和联系人)中获取特定字段,并将其绑定到前端ASPX页面。在解决了一个关于LINQ查询的错误后,最终实现了预期的功能。

I'm taking advantage of new Microsoft.xRM SDK to improve my development productivity,

Here is an example to fetch some columns from various entities(e.g. account and contact) to bind the anoumous object list to front end aspx page later.

Whereas, I encountered an exception which message is "The 'select' and 'orderBy' calls may only reference a single common entity type. ".

hmm..., after my research I got some hint from the  link from Adx Studio which is the real author of the microsoft xRM sdk. Please refer to the link here

Finally, I adjusted my code snippet as below(Added ToList in the linq expression),

 

 

Now everything works well. Enjoy coding!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值