Replies: 2 comments
|
Hi @anavgil! Sorry for the late response. Sure! What's the problem you're facing? You can open an issue with a repro app and steps, so that I can investigate and then provide you with support regarding the issue. Thanks. |
0 replies
|
If you're having a similar issue as to what I was having then I may have a solution. services.AddDbContext<DbContext, ContextA>();
services.AddDbContext<DbContext, ContextB>();
serivces.AddUnitOfWork();
services.AddUnitOfWork<ContextA>();
services.AddUnitOfWork<ContextB>();in my Repository files I was doing the following: public sealed class Repo {
private readonly IUnitOfWork _unitOfWork;
public Repo(IUnitOfWork unitOfWork) {
_unitOfWork = unitOfWork;
}
}Once I looked at the IUnitOfWork interface I noticed there is a generic interface which allows you to select the DbContext, however it was not in the Readme.md examples, so I overlooked it. Working code was just replacing public sealed class Repo {
private readonly IUnitOfWork<ContextA> _unitOfWork;
public Repo(IUnitOfWork<ContextA> unitOfWork) {
_unitOfWork = unitOfWork;
}
} |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I need help about multiple bdcontext support. I have read in documentation that this component has support for multiple dbcontext, but i have tried it with no results.
Could you support about that please?
Thank you in advance.
Great job!!!
All reactions