IDbCommand command = connection.CreateCommand(); command.CommandType = CommandType.Text; command.CommandText = "SELECT * FROM Employees"; IDataReader reader = command.ExecuteReader(); while (reader.Read()) { Console.WriteLine("{0}\t{1}\t{2}", reader.GetInt32(0), reader.GetString(1), reader.GetDecimal(2)); }In this example, we create an IDbCommand object using the CreateCommand() method of the connection object. We set the command type as Text and query to select all employees from the Employees table. We then create a data reader and execute the command using ExecuteReader(). We then read the data from the reader using GetInt32(), GetString() and GetDecimal() methods and print it to the console. Package library for IDbCommand is System.Data.IDbCommand.