
Hello,
I try to make the following query using Account, Case and Activity entities :
var findCases =
from a in context.AccountSet
join c in context.IncidentSet
on a.AccountId equals c.CustomerId.Id
join p in context.ActivityPointerSet
on c.Id equals p.RegardingObjectId.Id
select new
{
TicketNumber = c.TicketNumber,
IncidentId = c.IncidentId,
Title = c.Title,
CreatedOn = c.CreatedOn,
StateCode = c.StateCode,
AccountName = a.Name,
};
The execution of this query gives the error:
AttributeFrom and AttributeTo must be either both specified or both ommited. You can not pass only one or the other. AttributeFrom: , AttributeTo: regardingobjectid
Any suggestion will be appreciated.
Regards.
Radu Antonache
*This post is locked for comments
I have the same question (0)Sometimes is the order of the joins.
why you have a comment on //ActivityTypeCode = p.ActivityTypeCode?
note that the comment is leaving the parameter above with a comma
that statement should be like:
{
TicketNumber = c.TicketNumber,
IncidentId = c.IncidentId,
Title = c.Title,
CreatedOn = c.CreatedOn,
StateCode = c.StateCode,
AccountName = a.Name(no comma here)
//ActivityTypeCode = p.ActivityTypeCode
};