Exemple #1
0
 public void CreateConnection(string connectionName)
 {
     try
     {
         ConfigHelper.ConnectionString = ConfigurationManager.ConnectionStrings[connectionName].ConnectionString;
         var dbHelper = new DBHelper();
         dbHelper.CreateDBObjects(ConfigHelper.ConnectionString, DBHelper.Providers.SqlServer);
         connection       = dbHelper.connection;
         connectionString = ConfigHelper.ConnectionString;
         TransactionmanagerHelper.OverrideMaximumTimeout(TimeSpan.FromSeconds(commandTimeOut));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #2
0
 public void CreateConnection()
 {
     try
     {
         if (this.connection == null || this.connection.ConnectionString == string.Empty)
         {
             var dbHelper = new DBHelper();
             dbHelper.CreateDBObjects(ConfigHelper.ConnectionString, DBHelper.Providers.SqlServer);
             connection       = dbHelper.connection;
             connectionString = ConfigHelper.ConnectionString;
         }
         TransactionmanagerHelper.OverrideMaximumTimeout(TimeSpan.FromSeconds(commandTimeOut));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }