Example #1
0
        static void Main(string[] args)
        {
            IFactoryDatabase factory = new SqlServerFac();
            IDepartMent sqlServer = factory.GetInstance();
            sqlServer.Insert("helloworld!");

            IFactoryDatabase acfactory = new AccessFac();
            IDepartMent acServer = acfactory.GetInstance();
            acServer.Insert("helloworld!");
            Console.ReadKey();
        }
Example #2
0
        static void Main(string[] args)
        {
            IFactoryDatabase factory   = new SqlServerFac();
            IDepartMent      sqlServer = factory.GetInstance();

            sqlServer.Insert("helloworld!");


            IFactoryDatabase acfactory = new AccessFac();
            IDepartMent      acServer  = acfactory.GetInstance();

            acServer.Insert("helloworld!");
            Console.ReadKey();
        }