Ejemplo n.º 1
0
        public void Main()
        {
            IFactoryDatabase factory   = new SqlServerFac();
            IDepartMent      sqlServer = factory.GetInstance();

            sqlServer.Insert("helloworld!");
        }
Ejemplo n.º 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();
        }