i know how to acess to appsetting.json fron razor component but how from any class in a blazor serverside project?
from razor component i simply inject:
@inject IConfiguration _config
and access all that i need like :_config.GetConnectionString("default")
but how can do the same from any class?when i try to do
IConfiguration _config;
it says when i want to reach data that _config is null or is an unassigned local variable depands where i write the variable.