Post navigation← PreviousNext →Posted on by Leon van Bokhorst
The DbContext of Entity Framework lets us add, remove, attach and detach entities to and from it. Calling SaveChanges on the DbContext the Entity Framework performs different actions on entities dependant on their EntityState. So an added entity gets inserted, a removed entity gets deleted and so on.
In this example we use the AssemblyItem entity from a previous post to perform some of the most common actions on the entities and DbContext. ... (more)