我有以下型号:
class Item
{
public ICollection<string> GroupIds { get; set; }
// Introduced for EF only
public ICollection<Group> Groups { get; set; }
}
class Group
{
public ICollection<string> ItemIds { get; set; }
// Introduced for EF only
public ICollection<Item> Items { get; set; }
}
class Store
{
public ICollection<Item> Items { get; set; }
public ICollection<Group> Groups { get; set; }
}
Store 包含 allItems和 all Groups,但 everyItem可能与一个或多个相关,Group并且 everyGroup可能与一个或多个相关Item。
Item如何配置and之间的多对多关系Group以仅加载GroupIdsandItemIds而不加载对象本身?