createScope method
ServiceScope
createScope()
Creates a new ServiceScope
that can be used to resolve scoped services.
Implementation
ServiceScope createScope() =>
getRequiredService<ServiceScopeFactory>().createScope();