0
У меня есть набор отношений, которые я не уверен в настройке в FluentAPI. Вот моя дистиллированная модель:EF Code-First - Fluent API Mapping
public class Customer
{
public int Id { get; set; }
public string Name { get; set; }
public virtual ICollection<Reference> References { get; set; }
}
public class Reference
{
public int Id { get; set; }
public string Relationship { get; set; } // Brother, Father, etc
public virtual Customer LinkedCustomer { get; set; }
public virtual Customer ReferenceFor { get; set; }
}
СсылкаДля ссылок на ссылки в Customer. LinkedCustomer обращается к Клиенту с просьбой о том, чтобы ссылка была основана. В принципе, Клиент может быть ссылкой для любого другого числа клиентов.
Я думаю, что это множество отношений Many-Many и Many-One, но я не уверен, как их указать в Fluent API. Любая помощь будет оценена!