相关疑难解决方法(0)

LINQ to CRM - 或在Where子句中

我正在尝试使用LINQ从Dynamics CRM 2011中提取一些数据.目标是使所有自特定日期以来发生更改的联系人记录或自同一日期以来更改子实体(PERC文件).查询看起来像这样:

// Bring all students who have changes (at Contact entity) after specific date
// momentInTime or the status of any of their perc files has been changed since
// that date 
var students = (from c in ContactSet
                join pl in cga_portallogonSet on c.Id equals pl.cga_ContactId.Id
                join ef in cga_percfileSet on c.Id equals ef.cga_StudentId.Id
                where
                    (pl.cga_PortalLogonRole.Value == 284970000) // student
                where
                    (c.ModifiedOn >= momentInTime || c.CreatedOn > momentInTime)
                    ||
                    (ef.cga_statuschangedate >= momentInTime)
                select c.cga_StudentNumber).Distinct().ToList();
Run Code Online (Sandbox Code Playgroud)

这会产生以下错误消息:

'Contact'实体不包含Name ='cga_statuschangedate'的属性. …

linq microsoft-dynamics crm dynamics-crm dynamics-crm-2011

3
推荐指数
1
解决办法
1809
查看次数