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

请问IUnitOfWork是个什么概念? #44

Closed
AdamvvYau opened this issue Nov 30, 2018 · 3 comments
Closed

请问IUnitOfWork是个什么概念? #44

AdamvvYau opened this issue Nov 30, 2018 · 3 comments

Comments

@AdamvvYau
Copy link

很多地方看到有IUnitOfWork,这个是什么概念?用来分区?
另外,
[Model( "model" )]
public class RoleDto
Dto类属性Model又是用来标识什么的呢?会在哪里有效果?
谢谢!

@UtilCore
Copy link
Contributor

IUnitOfWork是工作单元,工作单元的概念出自《企业应用架构模式》,它用来记录将对象进行数据库操作时所产生的变化,EF Core的DbContext实现了这个概念,我抽象接口只是为了增加一点扩展性,万一以后要切换其它ORM时有用。

@UtilCore
Copy link
Contributor

Model属性是在我封装的Angular + Material这套UI上用的,用来指定ngModel绑定的模型名称,你不需要用到这个东西。

@AdamvvYau
Copy link
Author

谢谢解答!!

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