Вот уменьшенная версия таблиц.
Код: Выделить всё
public class People
{
public int PeopleId { get; set; }
public string PeopleName { get; set; }
public int? ProductId { get; set; }
public virtual Product Product { get; set; }
}
Код: Выделить всё
public class Product
{
public Product()
{
PeopleCollection = HashSet
();
}
public int ProductId { get; set; }
public string ProductName { get; set; }
public virtual ICollection Peoples { get; set; }
}
Подробнее здесь: https://stackoverflow.com/questions/440 ... ncing-loop
Мобильная версия