本文介绍了不能在siverlight linq中使用Join的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试通过Odata服务在siverlight中从crm访问数据.
我想根据联系人姓名检索帐户信息.
出于与查询中使用联接相同的目的.
在"_account.LoadAsync(qery2);"处执行时我收到不支持Join的错误.

我的问题可能很愚蠢,但如果你们中的任何一个可以帮助我,我将不胜感激.

在此先感谢


我使用的命名空间

Hi,

I am trying to access data from crm in siverlight through Odata Service.
I want to retrive account info on the basis of contact name.
for the same purpose I used join in my query.
While executing at "_account.LoadAsync(qery2);" I get error that Join is not supported.

My question might be silly but I would be too grateful to you If any one of you could help me out.

Thanks in advance


Namespaces I used

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.ComponentModel;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using SilverlightApplication55.ServiceReference1;
using ctccrm.ODataService;
using ctccrm.OrgService;
using System.Data.Services.Client;
using System.Windows.Navigation;
using System.ServiceModel.DomainServices.Client.ApplicationServices;
using System.Windows.Data;
using System.Collections.ObjectModel;
using System.ServiceModel.DomainServices.Client;




代码段




Code Snippet

var qery2 = from a in context.AccountSet
            join c in context.ContactSet on a.PrimaryContactId.Id equals c.ContactId
            where c.FullName.Contains("Prateek")
            select a;



account.LoadCompleted += new EventHandler<LoadCompletedEventArgs> _account_LoadCompleted_1);

            _account.LoadAsync(qery2);

推荐答案


这篇关于不能在siverlight linq中使用Join的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 04:46