I'm trying to convert an Enti开发者_开发技巧tyCollection 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>.
加载中,请稍侯......
精彩评论