Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Just need quick clarification on Remove EF6

$
0
0

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.


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>