public AdUrlRedirects(IEnumerable <string> originalAdUrls) { foreach (string url in originalAdUrls) { StoredProcs.AdRedirectUrls_AddRedirectUrl(url).Execute(); } var urls = StoredProcs.AdRedirectUrls_GetRedirectUrls().Execute().ToList(); this.OriginalUrlsByGuid = urls .ToDictionary(r => r.Ad_Guid.ToString("N"), r => r.Redirect_Url, StringComparer.OrdinalIgnoreCase); this.GuidsByOriginalUrl = urls .ToDictionary(r => r.Redirect_Url, r => r.Ad_Guid.ToString("N"), StringComparer.OrdinalIgnoreCase); }
public IEnumerable <Tables.AdRedirectUrls> GetAdClicks() { return(StoredProcs.AdRedirectUrls_GetRedirectUrls().Execute().OrderBy(url => url.Redirect_Url)); }