I am trying to get a composite key declared in a class with Attributes and DataAnnotation.
[Key]
[Column(Order=1)]
public Guid Id { get; set; }
[Key]
[Column(Order=2)]
public int Nr { get; set; }
does not seem to get this going. All I could find up to now was some fluent option, but I'd like to do this with annotations only.
To clarify: I am searching for a DataAnnotation way to create a table with a primary key consisting of 2 fields Id and Nr...
Thanks for your help Andreas