My understanding is that when using the built in the dependency injection, a .NET Core console app will require you to create and manage all scopes yourself whereas a ASP.NE
CreateScope from IServiceProvider resolve IServiceScopeFactory and call CreateScope() on it:
public static IServiceScope CreateScope(this IServiceProvider provider)
{
return provider.GetRequiredService<IServiceScopeFactory>().CreateScope();
}
So, as said @Evk
functionally both methods are identical
IServiceProvider just wrapped call CreateScope() from IServiceScopeFactory