public void LoadCountryObject(ILookupServiceRepository lookupServiceRepository) { ICountry country = default(Country); if (CountryId != string.Empty) { IList <ICountry> countries = lookupServiceRepository.GetAllCountry(); if (countries.Count != 0) { country = countries.SingleOrDefault(x => x.Id == CountryId); } } this.CountryObject = country; }
public static IList <ICountry> GetCountries1(ILookupServiceRepository lookupServiceRepository) { string cacheKey = LanguagePrefix() + CacheKeys.CountryList; object countries = CacheManager.Get(cacheKey); if (countries == null) { IList <ICountry> returnList = lookupServiceRepository.GetAllCountry(); CacheManager.Add(cacheKey, returnList); return(returnList); } else { return((IList <ICountry>)countries); } }
public void LoadList(ILookupServiceRepository lookupServiceRepository) { this.ListCountry = lookupServiceRepository.GetAllCountry(); }