public static void ClearTable(string tableName, DALISGDatabaseType databaseType)
 {
     var db = new DatabaseProviderFactory().Create(Database.GetDABConnectionKey(databaseType));
     using (var cmd = db.GetSqlStringCommand(string.Format("DELETE FROM {0}", tableName)))
     {
         cmd.CommandTimeout = 3000;
         db.ExecuteNonQuery(cmd);
     }
 }
예제 #2
0
 private static void ClientExecuteStoredProcedure(string storedProcedureName, string tableName, IEnumerable<DbParameter> parameters)
 {
     var db = new DatabaseProviderFactory().Create(Database.GetDABConnectionKey(DALISGDatabaseType.ISGTransient));
     using (var cmd = db.GetStoredProcCommand(tableName.Replace("_", string.Format("_{0}_", storedProcedureName))))
     {
         foreach (var parameter in parameters)
         {
             cmd.Parameters.Add(parameter);
         }
         db.ExecuteNonQuery(cmd);
     }
 }