我正在使用LINQPad连接本地CRM组织上的ODATA服务,但我不知道如何使用LINQPad执行“联接”操作或遍历关系。
这是我的URL:
OrganizationData.svc/New_locationSet?$select=new_state_new_location/new_Region$expand=new_state_new_location
在浏览器中运行良好。这是我在LINQPad中所做的:
from l in new_locationSet
from s in l.new_state_new_location
select s.new_Region
但是我遇到了一个错误:
An expression of type 'LINQPad.User.New_state' is not allowed in a subsequent from clause in a query expression with source type 'System.Data.Services.Client.DataServiceQuery<LINQPad.User.New_location>'. Type inference failed in the call to 'SelectMany'.
有任何想法吗?我发现LINQPad OData文档极其匮乏...