Hello experts,
is there maybe a simple Linq equivalent to that?
Guid incidentid = (Guid)dataReader.GetValue(0); // just to let you know what this variable is
foreach(Entity incident in crmResult.Entities)
{
if(incident.GetAttributeValue<EntityReference>("incidentid").Id == incidentid)
{
//Found! Do stuff here...
}
}
What I tried
if(crmResult.Entities.Where(x => x.GetAttributeValue<EntityReference>("incidentid").Id == incidentid))
And
Entity incident = from x in crmResult.Entities
where x.GetAttributeValue<EntityReference>("incidentid").Id == incidentid
select x;
And some other things but my knowledge in linq ends with FirstOrDefault.
*This post is locked for comments
I have the same question (0)