开发者

How to create an Entity Data Model for generic types?

开发者 https://www.devze.com 2023-02-01 06:54 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消