public static CafeCollection MapToType(CaaS.Content content)
        {
            var model = new CafeCollection
            {
                Title    = content.Value <string>("title"),
                BodyText = content.Value <string>("bodyText"),
            };

            model.MapCommonProperties(content);
            return(model);
        }
        public static ProductCollection MapToType(CaaS.Content content)
        {
            var model = new ProductCollection
            {
                Title    = content.Value <string>("title"),
                SubTitle = content.Value <string>("subTitle"),
            };

            model.MapCommonProperties(content);
            return(model);
        }
示例#3
0
        public static ContentPage MapToType(CaaS.Content content)
        {
            var model = new ContentPage
            {
                Title     = content.Value <string>("title"),
                BodyText  = content.Value <UmbracoGrid>("bodyText"),
                HeroImage = content.Value <CaaS.Image>("heroImage"),
            };

            model.MapCommonProperties(content);
            return(model);
        }
        public static Home MapToType(CaaS.Content content)
        {
            var model = new Home
            {
                BannerImage = content.Value <CaaS.Image>("bannerImage"),
                Headline    = content.Value <string>("headline"),
                SubHeading  = content.Value <string>("subHeading"),
                Title       = content.Name,
            };

            model.MapCommonProperties(content);
            return(model);
        }
        public static Product MapToType(CaaS.Content content)
        {
            var model = new Product
            {
                Title        = content.Value <string>("title"),
                Price        = content.Value <decimal>("price"),
                Description  = content.Value <IHtmlContent>("description"),
                ProductImage = content.Value <CaaS.Image>("productImage"),
            };

            model.MapCommonProperties(content);
            return(model);
        }
示例#6
0
        public static Cafe MapToType(CaaS.Content content)
        {
            var model = new Cafe
            {
                Title          = content.Name,
                BuildingNumber = content.Value <string>("buildingNumber"),
                AddressLine1   = content.Value <string>("addressLine1"),
                AddressLine2   = content.Value <string>("addressLine2"),
                Suburb         = content.Value <string>("suburb"),
                Postcode       = content.Value <string>("postcode"),
                State          = content.Value <string>("state")
            };

            model.MapCommonProperties(content);
            return(model);
        }