I'm using EF 6 with MVC 5. I have a class defined as follows:
public class ConEdSignup
{
[Key, Column(Order = 0)]
public virtual ApplicationUser Attendee { get; set; }
[Key, Column(Order = 1)]
public virtual ConEdSession ConEdSession { get; set; }
[Required]
public DateTime SignupTime { get; set; }
[Required]
public bool Attended { get; set; }
}
This is basically a link table for a many-to-many relationship where I have additional properties about that relationship. When I try to create a migration for this, it gives me the error "Models.ConEdSignup: : EntityType 'ConEdSignup' has no key defined. Define the key for this EntityType."
I clearly defined the keys for it, but it doesn't like it. How can I use these navigation properties as the primary keys?