IServiceScopeFactory
Creates instances of IServiceScope, which is used to create
services within a scope.
using System.Runtime.CompilerServices;
namespace Microsoft.Extensions.DependencyInjection
{
[System.Runtime.CompilerServices.NullableContext(1)]
public interface IServiceScopeFactory
{
IServiceScope CreateScope();
}
}