User1034446946 posted
Hi
I have a complex model with 3 tiers
I want to Detach the 3rd tier from the second tier (remove the navigation link) but not delete them from the database
then I want remove the 2nd tier from the database completely
I am using EF6, how do I go about it
Is it something like
foreach(var one in OneModel)
{
foreach(var two in one.ModelTwo)
{
two.ThreeModel.Clear();//This detaches the third models
}
two.Remove()//This detaches the secondmodel
}
}
Any information would be appriciated.