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(); } }
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(); } }