Quantcast
Channel: entityframework Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1793

New Post: Custom collection support broken in EF6 beta1

$
0
0
I have existing code that assigns a collection of entities to a custom collection.
Something like this:

MyCollection : List<MyDetailObject>

and

class MyMasterObject
{
public virtual MyCollection Details
{
get;
set;
}
}

This no longer works. Instead I get an error: "This operation is only valid on generic types." when I access the collection.

However, if I redefine my custom collection like this:
class MyCollection<T> : List<T> where t: MyDetailObject

and my class like this:

class MyMasterObject
{
public virtual MyCollection<MyDetailObject> Details
{
get;
set;
}
}

it works. It's like EF6 isn't traversing the class definition anymore?

Viewing all articles
Browse latest Browse all 1793

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>