I'm trying to convert an EntityCollection to a List but I don't see a way to do this.
Something like:
List<myEntity> entityList = myEntityCollection.ToList();
Did you try:
List<myEntity> entityList = new List<myEntity>(myEntityCollection);
And by the way if you import the System.Linq namespace in order to bring the .ToList() extension method into scope, there's no reason why:
List<myEntity> entityList = myEntityCollection.ToList();
wouldn't work as EntityCollection<T> implements IEnumerable<T>.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With