public IDbCommand Build(IDbConnectionWrapper connection) { var command = connection.CreateCommand(); if (_commandText != null) { command.CommandText = _commandText; } if (_commandTimeout != null) { command.CommandTimeout = _commandTimeout.Value; } if (_commandType != null) { command.CommandType = _commandType.Value; } foreach (var parameter in _parameters) { var dbParameter = command.CreateParameter(); dbParameter.ParameterName = parameter.Key; dbParameter.Value = parameter.Value ?? DBNull.Value; command.Parameters.Add(dbParameter); } return(command); }
private DbCommand BuildDbCommand(IDbConnectionWrapper connection) { var command = Build(connection); if (!(command is DbCommand)) { throw new NotSupportedException("Command must be DbCommand"); } return(command as DbCommand); }
public DatabaseStub(IDbConnectionWrapper connection) : base(connection) { }
internal SQLiteDatabase(IDbConnectionWrapper connection) : base(connection) { }
internal OdbcDatabase(IDbConnectionWrapper connection) : base(connection) { }
protected Database(IDbConnectionWrapper connection) { _connection = connection; }
internal PostgresDatabase(IDbConnectionWrapper connection) : base(connection) { }