var serviceProvider = services.BuildServiceProvider();
using (var scope = serviceProvider.CreateScope())
{
var app = serviceProvider.GetRequiredService<ISomeInterface>();
app.SomeMethod();
}
var serviceProvider = services.BuildServiceProvider();
using (var scope = serviceProvider.CreateScope())
{
var app = serviceProvider.GetRequiredService<ISomeInterface>();
app.SomeMethod();
}