public static IConfigurationBuilder AddDbConfiguration(this IConfigurationBuilder builder, IConfiguration config)
        {
            var dbProvider       = config["DatabaseProvider"];
            var connectionString = config.GetConnectionString("DefaultConnection");

            if (string.IsNullOrEmpty(dbProvider))
            {
                dbProvider = "mssql";
            }

            if (dbProvider.Equals("sqlite", StringComparison.InvariantCultureIgnoreCase))
            {
                builder.AddApplicationSettingProvider(options => options.UseSqlite(connectionString));
            }
            else
            {
                builder.AddApplicationSettingProvider(options => options.UseSqlServer(connectionString));
            }

            return(builder);
        }