Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问框架有实现ViewModel之间数据传递的功能吗? #7

Closed
Anonymy opened this issue Sep 14, 2022 · 1 comment
Closed

请问框架有实现ViewModel之间数据传递的功能吗? #7

Anonymy opened this issue Sep 14, 2022 · 1 comment

Comments

@Anonymy
Copy link

Anonymy commented Sep 14, 2022

#我在框架中暂未找到ViewModel之间数据传递的实现方式,请问作者有实现这块内容吗?类似于Prism中的时间聚合器,如果框架暂未实现,基于现有框架您推荐使用什么方式实现ViewModel之间的数据传递。谢谢!

@HeBianGu
Copy link
Owner

HeBianGu commented Sep 15, 2022

事件聚合器目前没有,我这边目前尽量是把ViewModel通过MVC的方式隔离开,一般不需要交互,对于数据交互方面通过单独定义Domain或者Service层,再或者通过数据库仓储和DBContext交互,特殊情况下ViewModel交互是用IOC注入的方式交互,比如你可以在代码中搜索下DataSourceLocator参考这种方式ServiceRegistry.Instance.GetInstance()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants