Hi, I have the following Linq request:
(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)
It throws the following FaultException
, which means its check attribute is new_ispaidstatus
on the wrong object. It should check new_PaymentStatus
, not new_contactsubscription
Faultexception
'new_contactsubscription' entity doesn't contain attribute with Name = 'new_ispaidstatus'.
If I use the following queries, it works fine:
(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)
OR
(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)
There seems to be something wrong with the Where
clause. Can someone help me fix this query.
Thanks at Advance
source share