public DatabaseAccess(IExecuteDML dmlExecutionProvider, IDatabaseTenant BarTenant)
        {
            _dbaccess = dmlExecutionProvider;

            Tenant = BarTenant;
            if (Tenant == null)
            {
                throw new Exception("CODE LOGIC ERROR: Tenant may not be null");
            }
        }
        private static IDatabaseAccess DbAccess()
        {
            if (_dbAcc == null)
            {
                if (_dbDetails.Type == DatabaseType.SQLite)
                {
                    _dbAcc = new DBAccessSqlite(_dbDetails.ConnectionString);
                }
                else if (_dbDetails.Type == DatabaseType.SQLServer)
                {
                    _dbAcc = new DBAccessSQServer(_dbDetails.ConnectionString);
                }
            }

            if (_dbAccess == null)
            {
                _dbAccess = new DatabaseAccess(_dbAcc, _dbDetails.DatabaseTenant);
            }
            return(_dbAccess);
        }