static void Main(string[] args) { DbCommand dbCommand = new DbCommand(new SqlConnection("SQL Database")); dbCommand.Execute(); dbCommand = new DbCommand(new OracleConnection("Oracle Database")); dbCommand.Execute(); }
static void Main(string[] args) { var sqlConnection = new SqlConnection("ABC"); // some timeout code here var dbCommand1 = new DbCommand(sqlConnection, "some sql instructions you want here"); dbCommand1.Execute(); var oracleConnection = new OracleConnection("DEF"); var dbCommand2 = new DbCommand(oracleConnection, "some oracle instruction"); dbCommand2.Execute(); }
static void Main(string[] args) { var command = new DbCommand(new SqlConnection("string connection"), "this is an instruction"); command.Execute(); }