I'm developing a WPF application using Entity Framework for my database communication. The application has a hierarchy of tabs where each tab has a db context. Each tab allows the user to view some particular object, make changes, save, update, close or open tabs for related objects.
My crux is that some tabs contain information that depends on other objects as well, an object O of type A may be related to other A objects (o_1,...,o_n) in a parent-children relationship, where I have a graphic indicator showing wether property P in O has the same value as P in all the children of O, for example. Red indicator means they are unequal, green means they are equal.
The "overlap" in information between contexts will only be presentation-wise, the different tabs will not be stepping on each others toes by changing each others data.
Now if I have Tabs for O and o_3 opened, change P in o_3 and save, the indicator in the tab for O might need to change as well, but since that tab has its own (now outdated) db context, the indicator still shows the old value, which might be confusing to the user.
This seems like a very general and common problem considering how many application has this architecture.
How would you solve the problem? I see a few different but flawed/problematic solutions.
A. Make the user aware of the fact that tabs can become "obsolete" when saving others. This feels like a forfeit to technological troubles.
B. Force updates of related tabs when saving. This would either overwrite user changes or I would have to build some system (repository pattern?) that maintains information of user changes and mediates what to update and what to keep, what to tell the user and so on.
C. Indicate outdated:ness of related tabs. This seems like the pragmatic solution, but the user is left to wonder what would be affected if updating the tab manually, and any changes made would have to be dismissed
D. Communicate the change to the other tab without involving the db context. This would sort of work, but could lead to complicated problems by introducing state that is not related to the db context, overall it would increase complexity