Why requires the whole IConfiguration object where you only need the SqlConnectionString property? It's more flexible to accepts a string.