Ejemplo n.º 1
0
 public static AbstractDalFactory GetDalFactory()
 {
     string dalType = ConfigurationManager.AppSettings["dalType"];
     AbstractDalFactory dalFactory = null;
     switch (dalType)
     {
         case "dala":
             dalFactory = new DalFactoryA();
             break;
         case "dalb":
             dalFactory = new DalFactoryB();
             break;
     }
     return dalFactory;
 }
Ejemplo n.º 2
0
        public static AbstractDalFactory GetDalFactory()
        {
            string             dalType    = ConfigurationManager.AppSettings["dalType"];
            AbstractDalFactory dalFactory = null;

            switch (dalType)
            {
            case "dala":
                dalFactory = new DalFactoryA();
                break;

            case "dalb":
                dalFactory = new DalFactoryB();
                break;
            }
            return(dalFactory);
        }