public bool RefreshTenant(string tenantUid, string tenantName, string languageCode = "en") { int betHistoryId = -1, sportId = -1, casinoId = -1, pokerId = -1, inPlayId = -1, liveCasinoId = -1, vegasId = -1, lotteryId = -1, liveScheduleId = -1; var extended = GetExtendedTenant(tenantUid); var children = TenantHelper.GetTenantNodes(ConnectorContext.ContentService, tenantUid); var tenantNode = TenantHelper.GetCurrentTenantHome(ConnectorContext.ContentService, tenantUid); if (tenantNode == null) { throw new TenantException(ExceptionCode.TenantNotFound.CodeToString(), ExceptionCode.TenantNotFound, tenantUid); } string cultureIsoCode = languageCode; try { if (languageService.HasLanguage(cultureIsoCode)) { if (children.Any()) { betHistoryId = children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Betting History")) != null?children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Betting History")).Id : -1; sportId = children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Sport")) != null?children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Sport")).Id : -1; inPlayId = children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("In-Play")) != null?children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("In-Play")).Id : -1; casinoId = children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Casino")) != null?children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Casino")).Id : -1; liveCasinoId = children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Live Casino")) != null?children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Live Casino")).Id : -1; vegasId = children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Vegas")) != null?children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Vegas")).Id : -1; lotteryId = children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Lottery")) != null?children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Lottery")).Id : -1; pokerId = children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Poker")) != null?children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Poker")).Id : -1; liveScheduleId = children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Live Schedule")) != null?children.SingleOrDefault(x => x.GetCultureName(cultureIsoCode).Equals("Live Schedule")).Id : -1; UpdateTenantPages(betHistoryId, sportId, casinoId, pokerId, inPlayId, liveCasinoId, vegasId, lotteryId, liveScheduleId); } nodeHelper.RefreshNodeName(tenantUid, tenantName); } ReassignCulturesAndHostnames(tenantUid); return(true); } catch { return(false); } }