Foreign Key To Microsoft.AspNet.Identity.EntityFramework.IdentityUser?
问题 I'm in VS 2013 and have just created an MVC application. I'm creating an object I intend to have a foreign key to the AspNetUsers table in the resulting database. The project does have an ApplicationUser (deriving from IdentityUser) that looks like a property-column match with the AspNetUsers table. How do we properly declare a foreign key to this? public MyObject { public string UserId { get; set; } [ForeignKey("UserId")] public ApplicationUser User { get; set;} // other properties } Now, I