2011-05-02 75 views
0

有没有办法在efcodefirst中首先创建带代码(模型)的复合键。EFCodeFirst ctp 5复合主键

ATM我有这个

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

我需要的资源型+的ResourceKey是复合键。

+2

可能的复制[复合键与EF 4.1代码优先](http://stackoverflow.com/questions/5466374/composite-key-with-ef-4-1-code -第一) – 2011-05-02 14:24:59

回答