The first step is registering a pooled factory with the DI container. This replaces the standard AddDbContext call:
AddDbContext