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

What is the best way to do the query cross CustomerRepository and OrderRepository #43

Closed
zhangpengchen opened this issue Aug 11, 2015 · 2 comments
Assignees
Labels

Comments

@zhangpengchen
Copy link
Contributor

Current due to it's in the two separate DbContext, we could not use join easily :(

@tatarincev
Copy link
Contributor

Is because we position our standart modules as isolated and each of it can be overriden to different implementation (for example Customer module may be overriden to Google contacts serice, Order module to Shipstation service) or uninstalled.
But if you want use same dbcontext for both modules you can write you new repository implementation (ICustomerRepository, ICustomerOrderReoosutory) used by one db context and within that implementation you can make easy joins queries. and injects your repository implementation to IoC container.

@zhangpengchen
Copy link
Contributor Author

Thks @tatarincev , it make senses 👍
And is there any reason in 2.x of VirtoCommerce try to split data model and domain model, currently most of them look same.

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

No branches or pull requests

3 participants