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?
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?