Hello, i am using two same entities. First is the entity i make back up file. As i insert new entity - some of its fields is not prefetched, so i call method to get this entity and set some properties.
For example:
CfrcManufacturerEntity fetchedEnt = cfrService.GetManufacturerWithDetails(manufacturer.ManufacturerId);
manufacturer.User = fetchedEnt.User;
it works fine, but when i try to set its property which contains EntityCollection, it throws exeption:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
for
IEnumerable<CfrcContactPersonEntity> col = fetchedEnt.CfrcContactPerson.AsEnumerable<CfrcContactPersonEntity>();
manufacturer.CfrcContactPerson.AddRange(col);
How can i set EntityCollection of this entity.
Thanks