Change current implementation of basic MVVM to adhere to SOLID pattern

后端 未结 2 1275
我在风中等你
我在风中等你 2021-01-27 04:24

I have been writing all my MVVM application with basic design pattern generally mentioned in MVVM examples available online. The pattern that I am following is described below:<

2条回答
  •  臣服心动
    2021-01-27 04:42

    Why are you injecting all these services in your viewmodel base class if the viewmodel base class does not make use of these services himself ?

    Just inject the services you need in the derived viewmodels that do need those services.

提交回复
热议问题