Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface Microsoft.​Extensions.​DependencyInjection.​IServiceScopeFactory
Assembly: Microsoft.Extensions.DependencyInjection.Abstractions
Creates instances of <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceScope" /> , which is used to create services within a scope.
Methods
CreateScope​()
Create an <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceScope" /> that
contains an <see cref="T:System.IServiceProvider" /> used to resolve dependencies from a
newly created scope.
Returns An <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceScope" /> controlling the
lifetime of the scope. Once this is disposed, any scoped services that have been resolved
from the <see cref="P:Microsoft.Extensions.DependencyInjection.IServiceScope.ServiceProvider" />
will also be disposed.