How to create an Entity Data Model for generic types?
I'm trying to make something similar to this with my Entity Data Model (model first approach), but I've no clue how to achieve it, so I need some ideas. Thanks beforehand.
public class JournalAttr开发者_开发百科ibute<E>
{
public String name { get; set; }
public E value { get; set; }
public JournalAttribute(String name, E value)
{
this.name = name;
this.value = value;
}
}
You can't. The EF doesn't support generically-typed entities.
精彩评论