private void StartCustomUrlCache() { if (customUrlsCache != null) { return; } customUrlsCache = new ConcurrentDictionary <string, string>(); var customUrls = customUrlRepository.GetAll(); foreach (var customUrl in customUrls) { customUrlsCache.TryAdd(customUrl.CustomPart, customUrl.Url); } }
private void StartCustomUrlCache() { if (customUrlsCache != null) { return; } customUrlsCache = new Hashtable(); var customUrls = customUrlRepository.GetAll(); foreach (var customUrl in customUrls) { customUrlsCache.Add(customUrl.CustomPart, customUrl.Url); } }
public ActionResult Index() { var customUrls = repo.GetAll(); return(View(customUrls)); }