Let’s say we have the “EntityCollection products”.
Then the following doesn’t work:
foreach (var product in products)
{
product.LastUpdate = DateTime.Now();
}
As you can also not index an EntityCollection, how do you modify an entity in en EntityCollection?
Try this, i create a generic method to update EntityCollection. Giv me your feed back.
You juste have to modify your product in your products entity collections. And call my
GenericUpdateEntityCollection(YourEntityCollection, YourObjectContext);and there you go