static void Main(string[] args) { IDbFactory dbFactory = new OracleFactory(); var connection = dbFactory.CreateConnection(); var command = dbFactory.CreateCommand(); connection.Open(); command.ExecuteQuery("Select * from table"); connection.Close(); Console.ReadKey(); }
static void Main(string[] args) { //new [NomeDaFabrica] -> poderia vir de um arquivo de configuração DBFactory db = new OracleFactory(); var con = db.createConnection(); con.Open(); var cmd = db.createCommand(); cmd.Execute(); Console.ReadLine(); }
static void Main(string[] args) { DBFactory db = new OracleFactory(); var con = db.createConnection(); con.Open(); var command = db.createCommand(); command.Execute(); Console.ReadKey(); }