Ensures all back office controllers have the thread culture set, we do this with a new application model targeting all back office controllers.

This commit is contained in:
Shannon
2020-08-06 22:08:27 +10:00
parent 1dac8779c2
commit 1239975b07
6 changed files with 108 additions and 22 deletions

View File

@@ -36,6 +36,7 @@ namespace Umbraco.Extensions
{
services.ConfigureOptions<UmbracoMvcConfigureOptions>();
services.TryAddEnumerable(ServiceDescriptor.Transient<IApplicationModelProvider, UmbracoApiBehaviorApplicationModelProvider>());
services.TryAddEnumerable(ServiceDescriptor.Transient<IApplicationModelProvider, BackOfficeApplicationModelProvider>());
// TODO: We need to avoid this, surely there's a way? See ContainerTests.BuildServiceProvider_Before_Host_Is_Configured
var serviceProvider = services.BuildServiceProvider();