-
Notifications
You must be signed in to change notification settings - Fork 848
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
Extend all repositories with overloaded constructor #1258
Comments
Of course! But only if you write for what? :) |
@tatarincev Sure :) There is a library called Effort for testing Entity Framework. Library allows to test with 'in memory' EF context. It's useful for integration testing. I saw in the platform solution that you have used LocalDB for that but I would like to avoid it. |
Well, no problem, I'll do it public. But as a workaround, you can define your own types of derived repositories with ctor's accepting DBConnection as a parameter. |
So I'm little hurried, I can't do this ctor's as public, because it won't help, any way you must to define new ctor's in derived repositories to allow passing DBConnection |
If I have a repository called MyRepository and it derives from ERepositoryBase that's not a problem I can do everything I want. But if I want to include in my tests PlatformRepository I don't have a public constructor which takes DBConnection. Even if I create PlatformRepositoryWrapper of some kind that derives from PlatformRepository I also can't call constructor that takes DBConnection. |
I got it. At first, I misunderstood you. But there a lot of modules which need to be changed! |
@tatarincev yes there is a couple of them :) Thank you in advance. |
If you prepare PR for the repositories that are most important to you, it will be the fastest, then our team will do it. :) |
From my perspective Customer, Catalog, Order and Platform are crucial. The rest is not very important to me but to be consistent probably all modules should be updated eventually. |
So the most important for me are: |
O sorry I didn't see your comment above. Ok I will do PR. |
It would be wonderful! Thanks |
@tatarincev I noticed you released my PR for the platform a couple of days ago. Thank you for that! That is a great improvement for my tests. Do you know when can I expect the rest of PRs to be released for each module? |
I've merged all your PRs (about this changes) in the other modules, but there are some not completed changes, they releases have a bit delayed, but they will certainly be soon |
Hi,
In ERepositoryBase class there are three constructor overloads. One of them is:
This constructor is not used by classes inheriting ERepositoryBase. May I ask to add this constructor (as public) to derived repositories? In modules and platform.
The text was updated successfully, but these errors were encountered: