Esempio n. 1
0
        public async Task <SiteSetting> GetSetting(string settingName)
        {
            if (string.IsNullOrEmpty(settingName))
            {
                throw new CallerException("Valid Setting Name Required");
            }

            SiteSetting setting;

            using (var uow = new UnitOfWork(Context))
            {
                var repo = new SiteSettingRepository(uow);

                setting = await repo.GetAll().Where(x => x.SettingName.ToUpper() == settingName.ToUpper()).FirstOrDefaultAsync();
            }

            return(setting);
        }
Esempio n. 2
0
 public IQueryable <SiteSetting> GetAll()
 {
     return(_siteSettingRepository.GetAll());
 }