private DatabaseCommandParameterExpression(string name, Database database)
        {
            this._database = database;

            this._parameter = _database.Factory.CreateParameter();
            this._parameter.Direction = ParameterDirection.Input;
            this._parameter.ParameterName = ParseParameterName(name);
        }
        protected DatabaseCommandExpression(string queryText, Database database)
        {
            if (String.IsNullOrEmpty(queryText))
                throw new ArgumentException("Query text cannot be null or empty");

            this._database = database;
            this._command = _database.Factory.CreateCommand();

            this._command.CommandText = queryText;
            this._command.CommandType = CommandType.Text;

            this._parameterExpressions = new List<DatabaseCommandParameterExpression>();
        } 
 /// <summary>
 /// Creates a data reader expression for the specified database command.
 /// </summary>
 /// <param name="command">The command where the data reader is to be retrieved.</param>
 /// <param name="database">The data provider used to create connections and other database objects.</param>
 /// <returns>The resulting data reader expression.</returns>
 public static DatabaseDataReaderExpression For(IDbCommand command, Database database)
 {
     return new DatabaseDataReaderExpression(command, database);
 } 
 private DatabaseDataReaderExpression(IDbCommand command, Database database)
 {
     this._command = command;
     this._database = database;
 } 
 /// <summary>
 /// Creates a command expression for the specified query.
 /// </summary>
 /// <param name="queryText">The query the command will execute.</param>
 /// <param name="database">The data provider used to create connections and other database objects.</param>
 /// <returns>The resulting command expression.</returns>
 public static DatabaseCommandExpression For(string queryText, Database database)
 {
     return new DatabaseCommandExpression(queryText, database);
 } 
 /// <summary>
 /// Creates a stored procedure expression for the specified stored procedure.
 /// </summary>
 /// <param name="storedProcedureName">The name of the stored procedure.</param>
 /// <param name="database">The data provider used to create connections and other database objects.</param>
 /// <returns>The resulting stored procedure expression.</returns>
 public static new DatabaseStoredProcedureExpression For(string storedProcedureName, Database database)
 {
     return new DatabaseStoredProcedureExpression(storedProcedureName, database);
 } 
 private DatabaseStoredProcedureExpression(string storedProcedureName, Database database)
     : base(storedProcedureName, database)
 {
     this.Type = CommandType.StoredProcedure;
 } 
 /// <summary>
 /// Creates a command parameter.
 /// </summary>
 /// <param name="name">The name of the parameter.</param>
 /// <param name="database">The data provider used to create connections and other database objects.</param>
 /// <returns>The resulting command parameter expression.</returns>
 public static DatabaseCommandParameterExpression For(string name, Database database)
 {
     return new DatabaseCommandParameterExpression(name, database);
 }