I´m developping a project using WPF + MVVM. The program needs to load objects (cases) from a repository and allow the user to edit it. The main functionalities are:
Currently, the version 0.1 uses a singleton class Session (in namespace model) to store a list from all cases loaded.
There is also a "Case Management" service that perform several operations in the Session singleton:
I´m new to WPF, and I would like to know if there is a design pattern that is suitable for this situation. I´m afraid that I´m not going to the right direction.
I dont know if I have provided all information needed, but I´m willing to answer any question as fast as I can.
Your design is fine, i can't see anything wrong.
I would suggest one thing though, get rid of that singleton session object and use dependency injection, and let the DI container decide what life strategy to use for the Session object at the application composition root.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments