Exemplo n.º 1
0
        public Store GetStoreByDomain(IStoreGeneralRepository storeService, HttpRequestBase request)
        {
            String siteStatus = ProjectAppSettings.GetWebConfigString("SiteStatus", "dev");
            Store  result     = null;

            if (siteStatus.IndexOf("live", StringComparison.InvariantCultureIgnoreCase) >= 0)
            {
                String domainName = "FUELTECHNOLOGYAGE.COM";
                domainName = request.Url.Scheme + Uri.SchemeDelimiter + request.Url.Host +
                             (request.Url.IsDefaultPort ? "" : ":" + request.Url.Port);
                domainName = GeneralHelper.GetDomainPart(domainName);
                result     = storeService.GetStore(domainName);
            }

            if (result == null)
            {
                String defaultSiteDomain = ProjectAppSettings.GetWebConfigString("DefaultSiteDomain", "login.seatechnologyjobs.com");
                result = storeService.GetStoreByDomain(defaultSiteDomain);
            }

            return(result);
        }