嗨,我有以下 Linq 查询:
(from c in new_contactsubscriptionSet
join p in new_PaymentStatusSet
on c.new_PaymentStatusId.Id equals p.new_PaymentStatusId
where (c.new_EndDate > DateTime.Now &&
c.new_EndDate <= DateTime.Now.AddDays(14)) &&
p.new_IsPaidStatus == false
select c)
它抛出以下内容FaultException
,这意味着它对new_ispaidstatus
错误实体的检查属性。它应该检查new_PaymentStatus
而不是new_contactsubscription
故障异常
'new_contactsubscription' entity doesn't contain attribute with Name = 'new_ispaidstatus'.
如果我使用以下查询,它的工作正常:
(from c in new_contactsubscriptionSet
join p in new_PaymentStatusSet
on c.new_PaymentStatusId.Id equals p.new_PaymentStatusId
where p.new_IsPaidStatus == false
select c)
或者
(from c in new_contactsubscriptionSet
join p in new_PaymentStatusSet
on c.new_PaymentStatusId.Id equals p.new_PaymentStatusId
where (c.new_EndDate > DateTime.Now &&
c.new_EndDate <= DateTime.Now.AddDays(14))
select c)
看起来该Where
子句有问题。谁能帮我解决这个查询。
提前致谢