It is a good practice to use Dependency Injection in a ViewModel?

后端 未结 0 565
情书的邮戳
情书的邮戳 2021-01-07 13:03

Which is the best option: instatiate a service in the ViewModel (like a FileDataService) and consume it, or use an interface (like IFileData) and use it with an constructor

相关标签:
回答
  • 消灭零回复
提交回复
热议问题