Foreign key for different named columns Entity Framework – Asp.net
public class Message { [Key] public int MeesageId { get; set; } public int SenderId { get; set; } [ForeignKey("PersonId")] public virtual Person Sender { get; set; } public int ReceiverId { get; set; } [ForeignKey("PersonId")] public virtual Person Receiver…