0

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

atm 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.

Nealv
  • 6,856
  • 8
  • 58
  • 89
  • 2
    possible duplicate of [Composite Key with EF 4.1 Code First](http://stackoverflow.com/questions/5466374/composite-key-with-ef-4-1-code-first) – Ladislav Mrnka May 02 '11 at 14:24

1 Answers1

0

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

Community
  • 1
  • 1
Nealv
  • 6,856
  • 8
  • 58
  • 89