I have an EntityCollection in my plugin, that I want to loop through and get all the primary field values. In my case: Resources on Service Appointment. Is there a good way?
Something like:
EntityCollection entityCollection = (EntityCollection)entityServiceAppointment["resources"];
string allPrimaryFields = "";
foreach(Entity entity in entityCollection.Entities)
{
allPrimaryFields += entity."Name"(But name does not exist here)
}