I would like do something like this, but contexts always null:
public DbCheck(IEnumerable<DbContext> contexts)
Context:
public class c1( DbContextOptions<c1> options ) : DbContext( options )
Registration:
services.AddDbContext<c1>( options => );
You could try below sample:
c1.cs (correct connectionstring)
c2.cs (wrong connectionstring)
program.cs
Controller
Test result

Explain:

If you check all the services in the "serviceprovider", you will find c1 and c2 are not implement from "DbContext", So you couldn't find them by"DbContext" directly from services. But you could get them from assembly. (Unlike "apple" implement from "IFruit").