Remove direct coupling with IConfiguration

Read all options in IConfiguration stored under key "EntityFramework:ContextName" in DbContextOptions.
Get ConnectionString & SqlServer:MaxBatchSize from DbContextOptions removing coupling with IConfiguration.
Don't use exceptions to control the flow of the program. The code in Extract that checks for only one extension doesn't seem useful here. In the place you copied it from it was used to ensure one and only one provider is registered. In this case the code just needs to find the SqlServerOptionsExtension and use it if found--so a simple query with a FirstOrDefault should be fine.