0
fadwell created
Hello!
I'm wondering how EfCoreUnitOfWork is registered, and what is the best option to register my custom(extended) UoW that inherited from EfCoreUnitOfWork?
Thanks!
2 Answer(s)
-
0
Hi,
It is registered by convention because it implements ITransientDependency. If you define your custom UoW in the same way, it will be registered by default.
If you want to replace existing UoW class with your version, You can do it in the PreInitialize method of your module using below syntax.
Configuration.ReplaceService<EfCoreUnitOfWork, YourEfCoreUnitOfWork>(DependencyLifeStyle.Transient);
-
0
Oh, I got it!
Thank you for clarifying!!
Have an answer to this question?
Log in
and write your answer.