I'm using the newest 2.0 version. In the help file under section "Generated code - Using the entity collection classes, Adapter" is this:
For .NET 2.0, you should use this declaration to define a generic EntityCollection instance:
// C# .NET 2.0
EntityCollection<CustomerEntity> customers =
new EntityCollectionEntityCollection<CustomerEntity>(new CustomerEntityFactory());
Note that "EntityCollectionEntityCollection" is a typo.
My question is around what the proper pattern should be for declaring/using EntityCollections now. In this example, a typed EntityCollection is used (as opposed to IEntityCollection or IEntityCollection2). Would you ever declare the instance as the interface type, or should the interface types only be used as method/parameter types for passing the collections around? Or does it matter either way?
Also, I assume that we should only be using IEntityCollection2 for any new code?
Thanks,
Brian