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;
 }
Exemple #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);
        }