Closed andreas-valtech closed 2 years ago
Hei,
Yes - seems like I didn't think through this. Will refactor to provide type instead. So when the resource provider will be created, I'll just ask IServiceProvider
to give me an instance.
Thx for pointing this out! 👍
Hi,
We are using DbLocalizationProvider.EPiServer v 7.2.0 in a CMS 12 site and localization works as it should. However we want to use a ManualResourceProvider but the EPiServer dependencies are not available with constructor injection if we place the code to add the provider in the ConfigureServices method in Startup:
We of cource place the call after AddCms() call but still does not work the dependencies are all null.
The SomeManualResourceProvider class uses ctor injection like this:
I guess it would work if we put the call in an InitializableModule but have not not tried that yet. Still think IoC should work without using InitializableModule.
Maybe the call to add a ManualResourceProvider could move to Configure method and the UseDbLocalizationProvider method?