You can use DI like follows.
using EfCoreDataChange;
public void ConfigureServices(IServiceCollection services)
{
services.AddDbContext(
RuntimeDBContextExtention<MyDBContext>.RuntimeContextType,
options =>
options.UseNpgsql(Configuration.GetConnectionString("DefaultConnection"));
}