示例#1
0
 static void Main(string[] args)
 {
     DBFactory db = new SQLFactory();
     var con = db.createConnection();
     con.Open();
     var cmd = db.createComand();
     cmd.Execute();
     Console.ReadLine();
 }
示例#2
0
        static void Main(string[] args)
        {
            DBFactory db  = new SQLFactory();
            var       con = db.CreateConnection();

            con.Open();

            var cmd = db.CreateCommand();

            cmd.Execute();

            db  = new MongoFactory();
            con = db.CreateConnection();
            con.Open();

            cmd = db.CreateCommand();
            cmd.Execute();
        }