private Database GetDatabase()
        {
            Debug.WriteLine($"SqlClientRepository GetDatabase, default database: '{_clientConfig.DefaultDatabase}'");

            var connection = _clientConfig.GetConfigConnection();

            if (!connection.IsAssigned())
            {
                return(new DatabaseProviderFactory().CreateDefault());
            }

            var config = ConnectionManagement.SetDatabaseSecurityInMemory(connection.UserName, connection.Password, connection.ConnectionName);

            return(new DatabaseProviderFactory(config.GetSection).Create(connection.ConnectionName));
        }