How to create a new instance of Microsoft.Xrm.Sdk.DataCollection<T>
class? I've done it by following code, but it doesn't seem all right to me:
DataCollection<Entity> dc = (new EntityCollection()).Entities;
The Microsoft.Xrm.Sdk.DataCollection<T>
class does not have a public constructor, so you cannot use it the way you are showing.
As an alternative you can design a collection class of your own and implement the ICollection<T>
interface or any other interface you need.