I am trying to save an update to an existing database entry but when I do I get the error:
Attaching an entity of type \'FFInfo.DAL.Location\' failed
Try just getting the entity by id rather than creating a new with fixed id:
var UpdateLocation = db.Locations.FirstOrDefault( l => l.ID == model.ID );
UpdateLocation.Description = model.Description;
...
The reason you see your exception is because your
model.ParentLocations = ...
materializes entities that most probably include the one you try to modify. Thus, the entity is already in the first level cache.
But then you try to pretend yet another entity of the same id exists.