Beispiel #1
0
 T RunStatementInternal <T>(StatementMap statement, ISession session, QueryParam[] parameters)
 {
     if ((statement.OperationType == MappedStatementType.ExecuteScalar) || (statement.OperationType == MappedStatementType.Query) || (statement.OperationType == MappedStatementType.Insert) || (statement.OperationType == MappedStatementType.Update))
     {
         SqlCommandRunner runner = new SqlCommandRunner();
         var result = runner.Run <T>(session, statement.Body.Trim(), null, parameters);
         return(result);
     }
     throw new GoliathDataException(string.Format("Operation {1} not supported on {0}. Use another Run method.", statement.Name, statement.OperationType));
 }
Beispiel #2
0
 public T Run <T>(string sql, TableQueryMap queryMap, params QueryParam[] paramArray)
 {
     return(commandRunner.Run <T>(this, sql, queryMap, paramArray));
 }