public AccountApiController(IConfiguration configuration, ILogger <AccountController> logger,
                             PgSqlContext pgContext, SqlServerContext sqlContext)
 {
     Configuration = configuration;
     Logger        = logger;
     DbContext     = (configuration.GetValue <string>("EntityFramework:Driver")) switch
     {
         "PostgreSql" => pgContext,
         "SqlServer" => sqlContext,
         _ => throw new InvalidOperationException("The EntityFramework:Driver configuration value must be set to \"PostgreSql\" or \"SqlServer\"."),
     };
 }
        public AccountController(IConfiguration configuration, ILogger <AccountController> logger, IDistributedCache cache,
                                 CryptoService crypto, SmtpClientService smtpClient, PgSqlContext pgContext, SqlServerContext sqlContext)
        {
            Configuration = configuration;
            Logger        = logger;
            Cache         = cache;
            Crypto        = crypto;
            SmtpClient    = smtpClient;

            DbContext = (configuration.GetValue <string>("EntityFramework:Driver")) switch
            {
                "PostgreSql" => pgContext,
                "SqlServer" => sqlContext,
                _ => throw new InvalidOperationException("The EntityFramework:Driver configuration value must be set to \"PostgreSql\" or \"SqlServer\"."),
            };
        }