I am using EF4 for the first time and have adopted a strategy of a UnitofWork (DataContext) per View. However, I am having issues and seek advice.
I have a window that displays a list of workstations, when I click the edit button I have another window that displays the selected workstation for edit.
The list view and the edit view use their own UnitOfWork, the selected workstation is passed through to the edit view, however when I try to save the workstation on the edit view I get the following;
An entity object cannot be referenced by multiple instances of IEntityChangeTracker
I know that this is because the workstation object that I passed through to the edit view has a data context associated with it.
How should i deal with this??