public class Container
{
public int Id { get; set; }
public string Name { get; set; }
public List<Item> Items { get; set; } = new List<Item>();
}
public class Item
{
public int Id { get; set; }
public string Name { get; set; }
public List<Item> LinkedItems { get; set; } = new List<Item>();
}
In order to get the Item n-m Item relation inside an extra table I put the following inside OnModelCreating method
Hi
I got this "simple" model
In order to get the
Item
n-mItem
relation inside an extra table I put the following insideOnModelCreating
methodSo let's assume
Container#1 { Items={ Item#1, Item#2, Item#3 } }
Container#2 { Items={ Item#4{ LinkedItems={ Item#1, Item#2 } } }
Container
Item#4
inside it.Item#1
, 1xDelete referenceItem#2
)My question is: *Is their a single
UpdateGraph()
call toItem#4
fromContainer#2
ANDItem#4
->Item#2
I finally got it running but I need 2 calls:
But this solution doesn't help very much since I have to run the second
UpdateGraph
on each child!