var rootRepositoryTest = pureCommand.BaseType?.GetGenericTypeDefinition() switch
{
var t when t == typeof(ReadModelPureCommand<>) => scope.ServiceProvider.GetService<ReadModelRootRepository<EventHandlingContext>>(),
var t when t == typeof(ResourceManagerPureCommand<>) => scope.ServiceProvider.GetService<ResourceManagerRootRepository<ExecutionEventHandlingContext>>(),
};
var rootRepositoryTest = pureCommand.BaseType?.GetGenericTypeDefinition() switch
{
var t when t == typeof(ReadModelPureCommand<>) => scope.ServiceProvider.GetService<ReadModelRootRepository<EventHandlingContext>>(),
var t when t == typeof(ResourceManagerPureCommand<>) => scope.ServiceProvider.GetService<ResourceManagerRootRepository<ExecutionEventHandlingContext>>(),
};