/// <summary> /// /// </summary> /// <param name="commandText"></param> /// <param name="commandType"></param> /// <param name="connection"></param> /// <param name="transaction"></param> /// <returns></returns> public override IDbCommand CreateCommand( string commandText, CommandType commandType, IDbConnection connection, IDbTransaction transaction) { ProvidersHelper.CheckConnection(connection, typeof(OdbcConnection)); ProvidersHelper.CheckTransaction(transaction, typeof(OdbcTransaction)); OdbcCommand __command = new OdbcCommand(commandText, (OdbcConnection)connection); __command.CommandType = commandType; if (transaction != null) { __command.Transaction = (OdbcTransaction)transaction; } return(__command); }
/// <summary> /// /// </summary> /// <param name="commandText"></param> /// <param name="commandType"></param> /// <param name="connection"></param> /// <param name="transaction"></param> /// <returns></returns> public override System.Data.IDbCommand CreateCommand( string commandText, CommandType commandType, IDbConnection connection, IDbTransaction transaction) { ProvidersHelper.CheckConnection(connection, typeof(SqlConnection)); if (transaction != null) { ProvidersHelper.CheckTransaction(transaction, typeof(SqlTransaction)); } SqlCommand __command = new SqlCommand(commandText, (SqlConnection)connection); __command.CommandType = commandType; if (transaction != null) { __command.Transaction = (SqlTransaction)transaction; } return(__command); }