S
saigkill0
Guest
i have created two DataProviders:
* CertsProvider
* CertsDeProvider
Then i added both to the Startup.cs
if (CultureInfo.CurrentCulture.Name == "de-DE")
{
svcs.AddScoped<CertsDeProvider>();
}
else
{
svcs.AddScoped<CertsProvider>();
}
and finally i added both to the cshtml:
@if (CultureInfo.CurrentCulture.Name == "de-DE")
{
@inject WilderBlog.Services.DataProviders.CertsDeProvider certs
}
else
{
@inject WilderBlog.Services.DataProviders.CertsProvider certs
}
While the runtime i'm getting after accessing the site: InvalidOperationException: No service for type 'WilderBlog.Services.DataProviders.CertsProvider' has been registered.
What can i do?
Sincerly yours Sascha
Continue reading...
* CertsProvider
* CertsDeProvider
Then i added both to the Startup.cs
if (CultureInfo.CurrentCulture.Name == "de-DE")
{
svcs.AddScoped<CertsDeProvider>();
}
else
{
svcs.AddScoped<CertsProvider>();
}
and finally i added both to the cshtml:
@if (CultureInfo.CurrentCulture.Name == "de-DE")
{
@inject WilderBlog.Services.DataProviders.CertsDeProvider certs
}
else
{
@inject WilderBlog.Services.DataProviders.CertsProvider certs
}
While the runtime i'm getting after accessing the site: InvalidOperationException: No service for type 'WilderBlog.Services.DataProviders.CertsProvider' has been registered.
What can i do?
Sincerly yours Sascha
Continue reading...