Beispiel #1
0
        static DaoProvider()
        {
            string typeOfDal = ConfigurationManager.AppSettings[Entities.Constants.KeyOfDal];

            if (typeOfDal.Equals(Entities.Constants.SqlDal))
            {
                UserDao    = new SqlUserDao();
                ProductDao = new SqlProductDao();
                ImageDao   = new SqlImageDao();
                RateDao    = new SqlRateDao();
            }
        }
Beispiel #2
0
        static DaoProvider()
        {
            string typeOfDal = ConfigurationManager.AppSettings[Entities.Constants.KeyOfDal];

            if (typeOfDal.Equals(Entities.Constants.FileDal))
            {
                UserDao      = new FileUserDao();
                AwardDao     = new FileAwardDao();
                UserAwardDao = new FileUserAwardDao();
            }
            if (typeOfDal.Equals(Entities.Constants.SqlDal))
            {
                UserDao      = new SqlUserDao();
                AwardDao     = new SqlAwardDao();
                UserAwardDao = new SqlUserAwardDao();
                ImageDao     = new SqlImageDao();
                AccountDao   = new SqlAccountDao();
            }
        }