Exemplo n.º 1
0
 public static SqliteDbConnection GetSqliteDbWorker()
 {
     if (_sqliteDbConnection == null)
     {
         _sqliteDbConnection = new SqliteDbConnection();
     }
     return(_sqliteDbConnection);
 }
Exemplo n.º 2
0
 public static bool ConnectToDb(string tns)
 {
     try
     {
         if (_dbConnection == null)
         {
             _dbConnection = SqliteDbConnection.GetSqliteDbWorker();
             _isConnected  = _dbConnection.ConnectToDb(tns);
         }
     }
     catch (Exception exp)
     {
         throw new Exception("ConnectToDb " + exp);
     }
     return(_isConnected);
 }