public LocaleStringResource GetById(int id, bool isCache = true) { LocaleStringResource locale; if (isCache) { var sbKey = new StringBuilder(); sbKey.AppendFormat(CacheLocalestringresourceKey, "GetById"); sbKey.AppendFormat("-{0}", id); var key = sbKey.ToString(); locale = _cacheManager.Get <LocaleStringResource>(key); if (locale == null) { locale = _localeStringResourceRepository.GetLocaleStringResourceById(id); _cacheManager.Put(key, locale); } } else { locale = _localeStringResourceRepository.GetLocaleStringResourceById(id); } return(locale); }
public App.Domain.Entities.Language.LocaleStringResource GetById(int id) { App.Domain.Entities.Language.LocaleStringResource locale = _LocaleStringResourceRepository.GetLocaleStringResourceById(id); return(locale); }