I do all my entity configuration with the fluent API
(where I could write
...HasForeignKey(e => new { e.ID, e.LanguageID })
I think the equivalent with dataanotations would be:
public class ActionProgress
{
[Key,Column(Order=0)]
[DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
public int ActionProgressID { get; set; }
[ForeignKey("ActionProgressStatus", Column(Order = 0)]
public int? StatusID { get; set; }
[ForeignKey("ActionProgressStatus", Column(Order = 1))]
public int? StatusLanguageID { get; set; }
public virtual Status ActionProgressStatus { get; set; }
}
Please try for yourself... Would be nice if you leave a note if it worked...