Ejemplo n.º 1
0
        protected override Content.SiteConfiguration.SiteConfiguration Handle(GetSiteConfigurationQuery request)
        {
            // TODO: Caching

            var node = documentQueryService.GetQuery <CMS.DocumentEngine.Types.KenticoContrib.SiteConfiguration>()
                       .Columns(
                nameof(CMS.DocumentEngine.Types.KenticoContrib.SiteConfiguration.SiteConfigurationDefaultMetadata)
                )
                       .ToList()
                       .FirstOrDefault();

            if (node == null)
            {
                return(null);
            }

            var siteConfig = mapper.Map <Content.SiteConfiguration.SiteConfiguration>(node);

            return(siteConfig);
        }
Ejemplo n.º 2
0
        protected override HomePage Handle(GetHomePageQuery request)
        {
            // TODO: Caching

            var node = documentQueryService.GetQuery <CMS.DocumentEngine.Types.KenticoContrib.Home>()
                       .Columns(
                nameof(CMS.DocumentEngine.Types.KenticoContrib.Home.HomeMetadata)
                )
                       .AddColumns(ColumnDefinitions.IPageColumns)
                       .ToList()
                       .FirstOrDefault();

            if (node == null)
            {
                return(null);
            }

            var homePage = mapper.Map <HomePage>(node);

            return(homePage);
        }