开发者

EFCodeFirst ctp 5 composite primary key

Is there a way to create a composite key in efcodefirst with code(model) first.

a开发者_如何学Ctm I have this

 [Key]
    public string ResourceType { get; set; }
    public string CultureCode { get; set; }
    public string ResourceKey { get; set; }
    public string ResourceValue { get; set; }

I need resourcetype+resourcekey to be the composite key.


I found the solution. It is the same as presented here Composite Key with EF 4.1 Code First

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜