В моем приложении указан следующий класс моделей:
public class Dispute
{
public long DisputeId { get; set; }
//[ForeignKey("Creditor")] FK;
[Column("Creditor Registry ID")]
public long CreditorRegistryId { get; set; }
//[ForeignKey("Registrant")] FK;
public long BorrowerId { get; set; }
[ForeignKey("Account")]
[Column("Creditor Registry ID", Order = 1)] // Fk
public int AccountCreditRegistryId { get; set; }
[ForeignKey("Account")]
[Column("Account No", Order = 2)] // Fk
public int AccountNo { get; set; }
public virtual Account Account { get; set; }
public virtual ICollection<DisputeTransaction> DisputeTransactions { get; set; }
}
и я получаю следующую ошибку при запуске приложения:
Указанная схема недействительна. Ошибки:
(90,6): ошибка 0019: каждое имя свойства в типе должно быть уникальным. Имя свойства 'ID реестра кредиторов' уже определено.
таблица счетов имеет составной ключ, который используется в объекте спора.
Пожалуйста, предложите решение.
Спасибо.