From ac998e8ab016cce404e6711f69a8a12410fd5b36 Mon Sep 17 00:00:00 2001 From: MichaelB Date: Mon, 26 Oct 2020 14:09:30 -0400 Subject: [PATCH 1/3] Upgrade SDK to v14.0 --- .../Models/AboutUs.Generated.cs | 45 +++++++++++++ .../Models/AboutUs.cs | 35 ---------- .../Models/Accessory.Generated.cs | 57 ++++++++++++++++ .../Models/Accessory.cs | 10 +++ .../Models/Article.Generated.cs | 61 +++++++++++++++++ .../Models/Article.cs | 53 --------------- .../Models/Brewer.Generated.cs | 57 ++++++++++++++++ .../Models/Brewer.cs | 10 +++ .../Models/Cafe.Generated.cs | 37 +++++++++++ kontent-sample-app-razorpages/Models/Cafe.cs | 27 -------- .../Models/Coffee.Generated.cs | 65 +++++++++++++++++++ .../Models/Coffee.cs | 55 ---------------- .../Models/CustomTypeProvider.cs | 4 ++ .../Models/FactAboutUs.Generated.cs | 27 ++++++++ .../Models/FactAboutUs.cs | 17 ----- .../Models/Grinder.Generated.cs | 57 ++++++++++++++++ .../Models/Grinder.cs | 10 +++ .../Models/HeroUnit.Generated.cs | 27 ++++++++ .../Models/HeroUnit.cs | 17 ----- .../Models/Home.Generated.cs | 53 +++++++++++++++ kontent-sample-app-razorpages/Models/Home.cs | 43 ------------ .../Models/HostedVideo.Generated.cs | 23 +++++++ .../Models/HostedVideo.cs | 13 ---- .../Models/Office.Generated.cs | 37 +++++++++++ .../Models/Office.cs | 10 +++ .../Models/Tweet.Generated.cs | 25 +++++++ kontent-sample-app-razorpages/Models/Tweet.cs | 15 ----- .../Pages/About/About.cshtml.cs | 5 +- .../Pages/Articles/Detail.cshtml.cs | 2 +- .../Pages/Articles/Index.cshtml.cs | 4 +- .../Pages/Cafes/Index.cshtml.cs | 4 +- .../Pages/Coffees/Detail.cshtml.cs | 2 +- .../Pages/Coffees/Index.cshtml.cs | 4 +- .../Contact/ContactViewComponent.cs | 1 + .../Pages/Contacts/Index.cshtml.cs | 4 +- .../Pages/Home/Index.cshtml.cs | 8 +-- .../Resolvers/CustomLinkUrlResolver.cs | 15 +++-- .../Resolvers/HostedVideoResolver.cs | 2 +- .../Resolvers/TweetResolver.cs | 3 +- kontent-sample-app-razorpages/Startup.cs | 1 + .../kontent-sample-app-razorpages.csproj | 2 +- 41 files changed, 646 insertions(+), 301 deletions(-) create mode 100644 kontent-sample-app-razorpages/Models/AboutUs.Generated.cs create mode 100644 kontent-sample-app-razorpages/Models/Accessory.Generated.cs create mode 100644 kontent-sample-app-razorpages/Models/Accessory.cs create mode 100644 kontent-sample-app-razorpages/Models/Article.Generated.cs create mode 100644 kontent-sample-app-razorpages/Models/Brewer.Generated.cs create mode 100644 kontent-sample-app-razorpages/Models/Brewer.cs create mode 100644 kontent-sample-app-razorpages/Models/Cafe.Generated.cs create mode 100644 kontent-sample-app-razorpages/Models/Coffee.Generated.cs create mode 100644 kontent-sample-app-razorpages/Models/FactAboutUs.Generated.cs create mode 100644 kontent-sample-app-razorpages/Models/Grinder.Generated.cs create mode 100644 kontent-sample-app-razorpages/Models/Grinder.cs create mode 100644 kontent-sample-app-razorpages/Models/HeroUnit.Generated.cs create mode 100644 kontent-sample-app-razorpages/Models/Home.Generated.cs create mode 100644 kontent-sample-app-razorpages/Models/HostedVideo.Generated.cs create mode 100644 kontent-sample-app-razorpages/Models/Office.Generated.cs create mode 100644 kontent-sample-app-razorpages/Models/Office.cs create mode 100644 kontent-sample-app-razorpages/Models/Tweet.Generated.cs diff --git a/kontent-sample-app-razorpages/Models/AboutUs.Generated.cs b/kontent-sample-app-razorpages/Models/AboutUs.Generated.cs new file mode 100644 index 0000000..d844f2e --- /dev/null +++ b/kontent-sample-app-razorpages/Models/AboutUs.Generated.cs @@ -0,0 +1,45 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class AboutUs + { + public const string Codename = "about_us"; + public const string FactsCodename = "facts"; + public const string MetadataMetaDescriptionCodename = "metadata__meta_description"; + public const string MetadataMetaTitleCodename = "metadata__meta_title"; + public const string MetadataOgDescriptionCodename = "metadata__og_description"; + public const string MetadataOgImageCodename = "metadata__og_image"; + public const string MetadataOgTitleCodename = "metadata__og_title"; + public const string MetadataTwitterCreatorCodename = "metadata__twitter_creator"; + public const string MetadataTwitterDescriptionCodename = "metadata__twitter_description"; + public const string MetadataTwitterImageCodename = "metadata__twitter_image"; + public const string MetadataTwitterSiteCodename = "metadata__twitter_site"; + public const string MetadataTwitterTitleCodename = "metadata__twitter_title"; + public const string SitemapCodename = "sitemap"; + public const string UrlPatternCodename = "url_pattern"; + + public IEnumerable Facts { get; set; } + public string MetadataMetaDescription { get; set; } + public string MetadataMetaTitle { get; set; } + public string MetadataOgDescription { get; set; } + public IEnumerable MetadataOgImage { get; set; } + public string MetadataOgTitle { get; set; } + public string MetadataTwitterCreator { get; set; } + public string MetadataTwitterDescription { get; set; } + public IEnumerable MetadataTwitterImage { get; set; } + public string MetadataTwitterSite { get; set; } + public string MetadataTwitterTitle { get; set; } + public IEnumerable Sitemap { get; set; } + public IContentItemSystemAttributes System { get; set; } + public string UrlPattern { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/AboutUs.cs b/kontent-sample-app-razorpages/Models/AboutUs.cs index 70f6bd4..e7383cc 100644 --- a/kontent-sample-app-razorpages/Models/AboutUs.cs +++ b/kontent-sample-app-razorpages/Models/AboutUs.cs @@ -1,9 +1,3 @@ -// This code was generated by a kontent-generators-net tool -// (see https://github.com/Kentico/kontent-generators-net). -// -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// For further modifications of the class, create a separate file with the partial class. - using System; using System.Collections.Generic; using Kentico.Kontent.Delivery.Abstractions; @@ -12,34 +6,5 @@ namespace kontent_sample_app_razorpages.Models { public partial class AboutUs { - public const string Codename = "about_us"; - public const string MetadataOgDescriptionCodename = "metadata__og_description"; - public const string MetadataMetaTitleCodename = "metadata__meta_title"; - public const string MetadataOgTitleCodename = "metadata__og_title"; - public const string MetadataMetaDescriptionCodename = "metadata__meta_description"; - public const string MetadataTwitterSiteCodename = "metadata__twitter_site"; - public const string UrlPatternCodename = "url_pattern"; - public const string MetadataTwitterImageCodename = "metadata__twitter_image"; - public const string SitemapCodename = "sitemap"; - public const string MetadataTwitterCreatorCodename = "metadata__twitter_creator"; - public const string MetadataTwitterTitleCodename = "metadata__twitter_title"; - public const string MetadataTwitterDescriptionCodename = "metadata__twitter_description"; - public const string MetadataOgImageCodename = "metadata__og_image"; - public const string FactsCodename = "facts"; - - public string MetadataOgDescription { get; set; } - public string MetadataMetaTitle { get; set; } - public string MetadataOgTitle { get; set; } - public string MetadataMetaDescription { get; set; } - public string MetadataTwitterSite { get; set; } - public string UrlPattern { get; set; } - public IEnumerable MetadataTwitterImage { get; set; } - public IEnumerable Sitemap { get; set; } - public string MetadataTwitterCreator { get; set; } - public string MetadataTwitterTitle { get; set; } - public string MetadataTwitterDescription { get; set; } - public IEnumerable MetadataOgImage { get; set; } - public IEnumerable Facts { get; set; } - public ContentItemSystemAttributes System { get; set; } } } \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Accessory.Generated.cs b/kontent-sample-app-razorpages/Models/Accessory.Generated.cs new file mode 100644 index 0000000..7d0c03c --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Accessory.Generated.cs @@ -0,0 +1,57 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Accessory + { + public const string Codename = "accessory"; + public const string ImageCodename = "image"; + public const string LongDescriptionCodename = "long_description"; + public const string ManufacturerCodename = "manufacturer"; + public const string MetadataMetaDescriptionCodename = "metadata__meta_description"; + public const string MetadataMetaTitleCodename = "metadata__meta_title"; + public const string MetadataOgDescriptionCodename = "metadata__og_description"; + public const string MetadataOgImageCodename = "metadata__og_image"; + public const string MetadataOgTitleCodename = "metadata__og_title"; + public const string MetadataTwitterCreatorCodename = "metadata__twitter_creator"; + public const string MetadataTwitterDescriptionCodename = "metadata__twitter_description"; + public const string MetadataTwitterImageCodename = "metadata__twitter_image"; + public const string MetadataTwitterSiteCodename = "metadata__twitter_site"; + public const string MetadataTwitterTitleCodename = "metadata__twitter_title"; + public const string PriceCodename = "price"; + public const string ProductNameCodename = "product_name"; + public const string ProductStatusCodename = "product_status"; + public const string ShortDescriptionCodename = "short_description"; + public const string SitemapCodename = "sitemap"; + public const string UrlPatternCodename = "url_pattern"; + + public IEnumerable Image { get; set; } + public IRichTextContent LongDescription { get; set; } + public string Manufacturer { get; set; } + public string MetadataMetaDescription { get; set; } + public string MetadataMetaTitle { get; set; } + public string MetadataOgDescription { get; set; } + public IEnumerable MetadataOgImage { get; set; } + public string MetadataOgTitle { get; set; } + public string MetadataTwitterCreator { get; set; } + public string MetadataTwitterDescription { get; set; } + public IEnumerable MetadataTwitterImage { get; set; } + public string MetadataTwitterSite { get; set; } + public string MetadataTwitterTitle { get; set; } + public decimal? Price { get; set; } + public string ProductName { get; set; } + public IEnumerable ProductStatus { get; set; } + public IRichTextContent ShortDescription { get; set; } + public IEnumerable Sitemap { get; set; } + public IContentItemSystemAttributes System { get; set; } + public string UrlPattern { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Accessory.cs b/kontent-sample-app-razorpages/Models/Accessory.cs new file mode 100644 index 0000000..1173e16 --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Accessory.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Accessory + { + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Article.Generated.cs b/kontent-sample-app-razorpages/Models/Article.Generated.cs new file mode 100644 index 0000000..c4cac06 --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Article.Generated.cs @@ -0,0 +1,61 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Article + { + public const string Codename = "article"; + public const string BodyCopyCodename = "body_copy"; + public const string MetaDescriptionCodename = "meta_description"; + public const string MetaKeywordsCodename = "meta_keywords"; + public const string MetadataMetaDescriptionCodename = "metadata__meta_description"; + public const string MetadataMetaTitleCodename = "metadata__meta_title"; + public const string MetadataOgDescriptionCodename = "metadata__og_description"; + public const string MetadataOgImageCodename = "metadata__og_image"; + public const string MetadataOgTitleCodename = "metadata__og_title"; + public const string MetadataTwitterCreatorCodename = "metadata__twitter_creator"; + public const string MetadataTwitterDescriptionCodename = "metadata__twitter_description"; + public const string MetadataTwitterImageCodename = "metadata__twitter_image"; + public const string MetadataTwitterSiteCodename = "metadata__twitter_site"; + public const string MetadataTwitterTitleCodename = "metadata__twitter_title"; + public const string PersonasCodename = "personas"; + public const string PostDateCodename = "post_date"; + public const string RelatedArticlesCodename = "related_articles"; + public const string SitemapCodename = "sitemap"; + public const string SummaryCodename = "summary"; + public const string TeaserImageCodename = "teaser_image"; + public const string TitleCodename = "title"; + public const string UrlPatternCodename = "url_pattern"; + + public string BodyCopy { get; set; } + public string MetadataMetaDescription { get; set; } + public string MetadataMetaTitle { get; set; } + public string MetadataOgDescription { get; set; } + public IEnumerable MetadataOgImage { get; set; } + public string MetadataOgTitle { get; set; } + public string MetadataTwitterCreator { get; set; } + public string MetadataTwitterDescription { get; set; } + public IEnumerable MetadataTwitterImage { get; set; } + public string MetadataTwitterSite { get; set; } + public string MetadataTwitterTitle { get; set; } + public string MetaDescription { get; set; } + public string MetaKeywords { get; set; } + public IEnumerable Personas { get; set; } + public DateTime? PostDate { get; set; } + public IEnumerable RelatedArticles { get; set; } + public IEnumerable Sitemap { get; set; } + public string Summary { get; set; } + public IContentItemSystemAttributes System { get; set; } + public IEnumerable TeaserImage { get; set; } + public string Title { get; set; } + public string UrlPattern { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Article.cs b/kontent-sample-app-razorpages/Models/Article.cs index a8a51b9..315d366 100644 --- a/kontent-sample-app-razorpages/Models/Article.cs +++ b/kontent-sample-app-razorpages/Models/Article.cs @@ -1,63 +1,10 @@ -// This code was generated by a kontent-generators-net tool -// (see https://github.com/Kentico/kontent-generators-net). -// -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// For further modifications of the class, create a separate file with the partial class. - using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using Kentico.Kontent.Delivery.Abstractions; namespace kontent_sample_app_razorpages.Models { public partial class Article { - public const string Codename = "article"; - public const string MetadataOgDescriptionCodename = "metadata__og_description"; - public const string MetadataMetaTitleCodename = "metadata__meta_title"; - public const string PersonasCodename = "personas"; - public const string BodyCopyCodename = "body_copy"; - public const string MetadataOgTitleCodename = "metadata__og_title"; - public const string MetadataMetaDescriptionCodename = "metadata__meta_description"; - public const string MetadataTwitterSiteCodename = "metadata__twitter_site"; - public const string PostDateCodename = "post_date"; - public const string MetaKeywordsCodename = "meta_keywords"; - public const string TeaserImageCodename = "teaser_image"; - public const string MetadataTwitterImageCodename = "metadata__twitter_image"; - public const string MetadataTwitterCreatorCodename = "metadata__twitter_creator"; - public const string TitleCodename = "title"; - public const string SummaryCodename = "summary"; - public const string SitemapCodename = "sitemap"; - public const string MetadataTwitterTitleCodename = "metadata__twitter_title"; - public const string MetadataTwitterDescriptionCodename = "metadata__twitter_description"; - public const string MetaDescriptionCodename = "meta_description"; - public const string MetadataOgImageCodename = "metadata__og_image"; - public const string RelatedArticlesCodename = "related_articles"; - public const string UrlPatternCodename = "url_pattern"; - - public string MetadataOgDescription { get; set; } - public string MetadataMetaTitle { get; set; } - public IEnumerable Personas { get; set; } - public string BodyCopy { get; set; } - public string MetadataOgTitle { get; set; } - public string MetadataMetaDescription { get; set; } - public string MetadataTwitterSite { get; set; } - [DisplayFormat(DataFormatString = "{0:MMM. dd, yyyy}")] - public DateTime? PostDate { get; set; } - public string MetaKeywords { get; set; } - public IEnumerable TeaserImage { get; set; } - public IEnumerable MetadataTwitterImage { get; set; } - public string MetadataTwitterCreator { get; set; } - public string Title { get; set; } - public string Summary { get; set; } - public IEnumerable Sitemap { get; set; } - public string MetadataTwitterTitle { get; set; } - public string MetadataTwitterDescription { get; set; } - public string MetaDescription { get; set; } - public IEnumerable MetadataOgImage { get; set; } - public IEnumerable
RelatedArticles { get; set; } - public string UrlPattern { get; set; } - public ContentItemSystemAttributes System { get; set; } } } \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Brewer.Generated.cs b/kontent-sample-app-razorpages/Models/Brewer.Generated.cs new file mode 100644 index 0000000..13e2589 --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Brewer.Generated.cs @@ -0,0 +1,57 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Brewer + { + public const string Codename = "brewer"; + public const string ImageCodename = "image"; + public const string LongDescriptionCodename = "long_description"; + public const string ManufacturerCodename = "manufacturer"; + public const string MetadataMetaDescriptionCodename = "metadata__meta_description"; + public const string MetadataMetaTitleCodename = "metadata__meta_title"; + public const string MetadataOgDescriptionCodename = "metadata__og_description"; + public const string MetadataOgImageCodename = "metadata__og_image"; + public const string MetadataOgTitleCodename = "metadata__og_title"; + public const string MetadataTwitterCreatorCodename = "metadata__twitter_creator"; + public const string MetadataTwitterDescriptionCodename = "metadata__twitter_description"; + public const string MetadataTwitterImageCodename = "metadata__twitter_image"; + public const string MetadataTwitterSiteCodename = "metadata__twitter_site"; + public const string MetadataTwitterTitleCodename = "metadata__twitter_title"; + public const string PriceCodename = "price"; + public const string ProductNameCodename = "product_name"; + public const string ProductStatusCodename = "product_status"; + public const string ShortDescriptionCodename = "short_description"; + public const string SitemapCodename = "sitemap"; + public const string UrlPatternCodename = "url_pattern"; + + public IEnumerable Image { get; set; } + public IRichTextContent LongDescription { get; set; } + public IEnumerable Manufacturer { get; set; } + public string MetadataMetaDescription { get; set; } + public string MetadataMetaTitle { get; set; } + public string MetadataOgDescription { get; set; } + public IEnumerable MetadataOgImage { get; set; } + public string MetadataOgTitle { get; set; } + public string MetadataTwitterCreator { get; set; } + public string MetadataTwitterDescription { get; set; } + public IEnumerable MetadataTwitterImage { get; set; } + public string MetadataTwitterSite { get; set; } + public string MetadataTwitterTitle { get; set; } + public decimal? Price { get; set; } + public string ProductName { get; set; } + public IEnumerable ProductStatus { get; set; } + public IRichTextContent ShortDescription { get; set; } + public IEnumerable Sitemap { get; set; } + public IContentItemSystemAttributes System { get; set; } + public string UrlPattern { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Brewer.cs b/kontent-sample-app-razorpages/Models/Brewer.cs new file mode 100644 index 0000000..078be3f --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Brewer.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Brewer + { + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Cafe.Generated.cs b/kontent-sample-app-razorpages/Models/Cafe.Generated.cs new file mode 100644 index 0000000..5cf71f5 --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Cafe.Generated.cs @@ -0,0 +1,37 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Cafe + { + public const string Codename = "cafe"; + public const string CityCodename = "city"; + public const string CountryCodename = "country"; + public const string EmailCodename = "email"; + public const string PhoneCodename = "phone"; + public const string PhotoCodename = "photo"; + public const string SitemapCodename = "sitemap"; + public const string StateCodename = "state"; + public const string StreetCodename = "street"; + public const string ZipCodeCodename = "zip_code"; + + public string City { get; set; } + public string Country { get; set; } + public string Email { get; set; } + public string Phone { get; set; } + public IEnumerable Photo { get; set; } + public IEnumerable Sitemap { get; set; } + public string State { get; set; } + public string Street { get; set; } + public IContentItemSystemAttributes System { get; set; } + public string ZipCode { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Cafe.cs b/kontent-sample-app-razorpages/Models/Cafe.cs index f557f04..3fc03ab 100644 --- a/kontent-sample-app-razorpages/Models/Cafe.cs +++ b/kontent-sample-app-razorpages/Models/Cafe.cs @@ -1,9 +1,3 @@ -// This code was generated by a kontent-generators-net tool -// (see https://github.com/Kentico/kontent-generators-net). -// -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// For further modifications of the class, create a separate file with the partial class. - using System; using System.Collections.Generic; using Kentico.Kontent.Delivery.Abstractions; @@ -12,26 +6,5 @@ namespace kontent_sample_app_razorpages.Models { public partial class Cafe { - public const string Codename = "cafe"; - public const string PhoneCodename = "phone"; - public const string CityCodename = "city"; - public const string PhotoCodename = "photo"; - public const string EmailCodename = "email"; - public const string CountryCodename = "country"; - public const string StreetCodename = "street"; - public const string StateCodename = "state"; - public const string ZipCodeCodename = "zip_code"; - public const string SitemapCodename = "sitemap"; - - public string Phone { get; set; } - public string City { get; set; } - public IEnumerable Photo { get; set; } - public string Email { get; set; } - public string Country { get; set; } - public string Street { get; set; } - public string State { get; set; } - public string ZipCode { get; set; } - public IEnumerable Sitemap { get; set; } - public ContentItemSystemAttributes System { get; set; } } } \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Coffee.Generated.cs b/kontent-sample-app-razorpages/Models/Coffee.Generated.cs new file mode 100644 index 0000000..4171c0c --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Coffee.Generated.cs @@ -0,0 +1,65 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Coffee + { + public const string Codename = "coffee"; + public const string AltitudeCodename = "altitude"; + public const string CountryCodename = "country"; + public const string FarmCodename = "farm"; + public const string ImageCodename = "image"; + public const string LongDescriptionCodename = "long_description"; + public const string MetadataMetaDescriptionCodename = "metadata__meta_description"; + public const string MetadataMetaTitleCodename = "metadata__meta_title"; + public const string MetadataOgDescriptionCodename = "metadata__og_description"; + public const string MetadataOgImageCodename = "metadata__og_image"; + public const string MetadataOgTitleCodename = "metadata__og_title"; + public const string MetadataTwitterCreatorCodename = "metadata__twitter_creator"; + public const string MetadataTwitterDescriptionCodename = "metadata__twitter_description"; + public const string MetadataTwitterImageCodename = "metadata__twitter_image"; + public const string MetadataTwitterSiteCodename = "metadata__twitter_site"; + public const string MetadataTwitterTitleCodename = "metadata__twitter_title"; + public const string PriceCodename = "price"; + public const string ProcessingCodename = "processing"; + public const string ProductNameCodename = "product_name"; + public const string ProductStatusCodename = "product_status"; + public const string ShortDescriptionCodename = "short_description"; + public const string SitemapCodename = "sitemap"; + public const string UrlPatternCodename = "url_pattern"; + public const string VarietyCodename = "variety"; + + public string Altitude { get; set; } + public string Country { get; set; } + public string Farm { get; set; } + public IEnumerable Image { get; set; } + public IRichTextContent LongDescription { get; set; } + public string MetadataMetaDescription { get; set; } + public string MetadataMetaTitle { get; set; } + public string MetadataOgDescription { get; set; } + public IEnumerable MetadataOgImage { get; set; } + public string MetadataOgTitle { get; set; } + public string MetadataTwitterCreator { get; set; } + public string MetadataTwitterDescription { get; set; } + public IEnumerable MetadataTwitterImage { get; set; } + public string MetadataTwitterSite { get; set; } + public string MetadataTwitterTitle { get; set; } + public decimal? Price { get; set; } + public IEnumerable Processing { get; set; } + public string ProductName { get; set; } + public IEnumerable ProductStatus { get; set; } + public IRichTextContent ShortDescription { get; set; } + public IEnumerable Sitemap { get; set; } + public IContentItemSystemAttributes System { get; set; } + public string UrlPattern { get; set; } + public string Variety { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Coffee.cs b/kontent-sample-app-razorpages/Models/Coffee.cs index 479c95f..c316c68 100644 --- a/kontent-sample-app-razorpages/Models/Coffee.cs +++ b/kontent-sample-app-razorpages/Models/Coffee.cs @@ -1,9 +1,3 @@ -// This code was generated by a kontent-generators-net tool -// (see https://github.com/Kentico/kontent-generators-net). -// -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// For further modifications of the class, create a separate file with the partial class. - using System; using System.Collections.Generic; using Kentico.Kontent.Delivery.Abstractions; @@ -12,54 +6,5 @@ namespace kontent_sample_app_razorpages.Models { public partial class Coffee { - public const string Codename = "coffee"; - public const string MetadataOgDescriptionCodename = "metadata__og_description"; - public const string MetadataMetaTitleCodename = "metadata__meta_title"; - public const string MetadataOgTitleCodename = "metadata__og_title"; - public const string ProductStatusCodename = "product_status"; - public const string AltitudeCodename = "altitude"; - public const string MetadataMetaDescriptionCodename = "metadata__meta_description"; - public const string VarietyCodename = "variety"; - public const string ImageCodename = "image"; - public const string MetadataTwitterSiteCodename = "metadata__twitter_site"; - public const string UrlPatternCodename = "url_pattern"; - public const string PriceCodename = "price"; - public const string MetadataTwitterImageCodename = "metadata__twitter_image"; - public const string MetadataTwitterCreatorCodename = "metadata__twitter_creator"; - public const string CountryCodename = "country"; - public const string SitemapCodename = "sitemap"; - public const string MetadataTwitterTitleCodename = "metadata__twitter_title"; - public const string ShortDescriptionCodename = "short_description"; - public const string ProcessingCodename = "processing"; - public const string MetadataTwitterDescriptionCodename = "metadata__twitter_description"; - public const string MetadataOgImageCodename = "metadata__og_image"; - public const string LongDescriptionCodename = "long_description"; - public const string FarmCodename = "farm"; - public const string ProductNameCodename = "product_name"; - - public string MetadataOgDescription { get; set; } - public string MetadataMetaTitle { get; set; } - public string MetadataOgTitle { get; set; } - public IEnumerable ProductStatus { get; set; } - public string Altitude { get; set; } - public string MetadataMetaDescription { get; set; } - public string Variety { get; set; } - public IEnumerable Image { get; set; } - public string MetadataTwitterSite { get; set; } - public string UrlPattern { get; set; } - public decimal? Price { get; set; } - public IEnumerable MetadataTwitterImage { get; set; } - public string MetadataTwitterCreator { get; set; } - public string Country { get; set; } - public IEnumerable Sitemap { get; set; } - public string MetadataTwitterTitle { get; set; } - public IRichTextContent ShortDescription { get; set; } - public IEnumerable Processing { get; set; } - public string MetadataTwitterDescription { get; set; } - public IEnumerable MetadataOgImage { get; set; } - public IRichTextContent LongDescription { get; set; } - public string Farm { get; set; } - public string ProductName { get; set; } - public ContentItemSystemAttributes System { get; set; } } } \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/CustomTypeProvider.cs b/kontent-sample-app-razorpages/Models/CustomTypeProvider.cs index 1b68c0b..c4cf51c 100644 --- a/kontent-sample-app-razorpages/Models/CustomTypeProvider.cs +++ b/kontent-sample-app-razorpages/Models/CustomTypeProvider.cs @@ -10,13 +10,17 @@ public class CustomTypeProvider : ITypeProvider private static readonly Dictionary _codenames = new Dictionary { {typeof(AboutUs), "about_us"}, + {typeof(Accessory), "accessory"}, {typeof(Article), "article"}, + {typeof(Brewer), "brewer"}, {typeof(Cafe), "cafe"}, {typeof(Coffee), "coffee"}, {typeof(FactAboutUs), "fact_about_us"}, + {typeof(Grinder), "grinder"}, {typeof(HeroUnit), "hero_unit"}, {typeof(Home), "home"}, {typeof(HostedVideo), "hosted_video"}, + {typeof(Office), "office"}, {typeof(Tweet), "tweet"} }; diff --git a/kontent-sample-app-razorpages/Models/FactAboutUs.Generated.cs b/kontent-sample-app-razorpages/Models/FactAboutUs.Generated.cs new file mode 100644 index 0000000..1a88e67 --- /dev/null +++ b/kontent-sample-app-razorpages/Models/FactAboutUs.Generated.cs @@ -0,0 +1,27 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class FactAboutUs + { + public const string Codename = "fact_about_us"; + public const string DescriptionCodename = "description"; + public const string ImageCodename = "image"; + public const string SitemapCodename = "sitemap"; + public const string TitleCodename = "title"; + + public IRichTextContent Description { get; set; } + public IEnumerable Image { get; set; } + public IEnumerable Sitemap { get; set; } + public IContentItemSystemAttributes System { get; set; } + public string Title { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/FactAboutUs.cs b/kontent-sample-app-razorpages/Models/FactAboutUs.cs index 6647fde..f1d4a67 100644 --- a/kontent-sample-app-razorpages/Models/FactAboutUs.cs +++ b/kontent-sample-app-razorpages/Models/FactAboutUs.cs @@ -1,9 +1,3 @@ -// This code was generated by a kontent-generators-net tool -// (see https://github.com/Kentico/kontent-generators-net). -// -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// For further modifications of the class, create a separate file with the partial class. - using System; using System.Collections.Generic; using Kentico.Kontent.Delivery.Abstractions; @@ -12,16 +6,5 @@ namespace kontent_sample_app_razorpages.Models { public partial class FactAboutUs { - public const string Codename = "fact_about_us"; - public const string DescriptionCodename = "description"; - public const string TitleCodename = "title"; - public const string SitemapCodename = "sitemap"; - public const string ImageCodename = "image"; - - public IRichTextContent Description { get; set; } - public string Title { get; set; } - public IEnumerable Sitemap { get; set; } - public IEnumerable Image { get; set; } - public ContentItemSystemAttributes System { get; set; } } } \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Grinder.Generated.cs b/kontent-sample-app-razorpages/Models/Grinder.Generated.cs new file mode 100644 index 0000000..2e2b344 --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Grinder.Generated.cs @@ -0,0 +1,57 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Grinder + { + public const string Codename = "grinder"; + public const string ImageCodename = "image"; + public const string LongDescriptionCodename = "long_description"; + public const string ManufacturerCodename = "manufacturer"; + public const string MetadataMetaDescriptionCodename = "metadata__meta_description"; + public const string MetadataMetaTitleCodename = "metadata__meta_title"; + public const string MetadataOgDescriptionCodename = "metadata__og_description"; + public const string MetadataOgImageCodename = "metadata__og_image"; + public const string MetadataOgTitleCodename = "metadata__og_title"; + public const string MetadataTwitterCreatorCodename = "metadata__twitter_creator"; + public const string MetadataTwitterDescriptionCodename = "metadata__twitter_description"; + public const string MetadataTwitterImageCodename = "metadata__twitter_image"; + public const string MetadataTwitterSiteCodename = "metadata__twitter_site"; + public const string MetadataTwitterTitleCodename = "metadata__twitter_title"; + public const string PriceCodename = "price"; + public const string ProductNameCodename = "product_name"; + public const string ProductStatusCodename = "product_status"; + public const string ShortDescriptionCodename = "short_description"; + public const string SitemapCodename = "sitemap"; + public const string UrlPatternCodename = "url_pattern"; + + public IEnumerable Image { get; set; } + public IRichTextContent LongDescription { get; set; } + public string Manufacturer { get; set; } + public string MetadataMetaDescription { get; set; } + public string MetadataMetaTitle { get; set; } + public string MetadataOgDescription { get; set; } + public IEnumerable MetadataOgImage { get; set; } + public string MetadataOgTitle { get; set; } + public string MetadataTwitterCreator { get; set; } + public string MetadataTwitterDescription { get; set; } + public IEnumerable MetadataTwitterImage { get; set; } + public string MetadataTwitterSite { get; set; } + public string MetadataTwitterTitle { get; set; } + public decimal? Price { get; set; } + public string ProductName { get; set; } + public IEnumerable ProductStatus { get; set; } + public IRichTextContent ShortDescription { get; set; } + public IEnumerable Sitemap { get; set; } + public IContentItemSystemAttributes System { get; set; } + public string UrlPattern { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Grinder.cs b/kontent-sample-app-razorpages/Models/Grinder.cs new file mode 100644 index 0000000..25686f2 --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Grinder.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Grinder + { + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/HeroUnit.Generated.cs b/kontent-sample-app-razorpages/Models/HeroUnit.Generated.cs new file mode 100644 index 0000000..05c21b7 --- /dev/null +++ b/kontent-sample-app-razorpages/Models/HeroUnit.Generated.cs @@ -0,0 +1,27 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class HeroUnit + { + public const string Codename = "hero_unit"; + public const string ImageCodename = "image"; + public const string MarketingMessageCodename = "marketing_message"; + public const string SitemapCodename = "sitemap"; + public const string TitleCodename = "title"; + + public IEnumerable Image { get; set; } + public IRichTextContent MarketingMessage { get; set; } + public IEnumerable Sitemap { get; set; } + public IContentItemSystemAttributes System { get; set; } + public string Title { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/HeroUnit.cs b/kontent-sample-app-razorpages/Models/HeroUnit.cs index 2e7b312..3aa798f 100644 --- a/kontent-sample-app-razorpages/Models/HeroUnit.cs +++ b/kontent-sample-app-razorpages/Models/HeroUnit.cs @@ -1,9 +1,3 @@ -// This code was generated by a kontent-generators-net tool -// (see https://github.com/Kentico/kontent-generators-net). -// -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// For further modifications of the class, create a separate file with the partial class. - using System; using System.Collections.Generic; using Kentico.Kontent.Delivery.Abstractions; @@ -12,16 +6,5 @@ namespace kontent_sample_app_razorpages.Models { public partial class HeroUnit { - public const string Codename = "hero_unit"; - public const string SitemapCodename = "sitemap"; - public const string TitleCodename = "title"; - public const string ImageCodename = "image"; - public const string MarketingMessageCodename = "marketing_message"; - - public IEnumerable Sitemap { get; set; } - public string Title { get; set; } - public IEnumerable Image { get; set; } - public IRichTextContent MarketingMessage { get; set; } - public ContentItemSystemAttributes System { get; set; } } } \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Home.Generated.cs b/kontent-sample-app-razorpages/Models/Home.Generated.cs new file mode 100644 index 0000000..b13199f --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Home.Generated.cs @@ -0,0 +1,53 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Home + { + public const string Codename = "home"; + public const string ArticlesCodename = "articles"; + public const string CafesCodename = "cafes"; + public const string ContactCodename = "contact"; + public const string HeroUnitCodename = "hero_unit"; + public const string MetadataMetaDescriptionCodename = "metadata__meta_description"; + public const string MetadataMetaTitleCodename = "metadata__meta_title"; + public const string MetadataOgDescriptionCodename = "metadata__og_description"; + public const string MetadataOgImageCodename = "metadata__og_image"; + public const string MetadataOgTitleCodename = "metadata__og_title"; + public const string MetadataTwitterCreatorCodename = "metadata__twitter_creator"; + public const string MetadataTwitterDescriptionCodename = "metadata__twitter_description"; + public const string MetadataTwitterImageCodename = "metadata__twitter_image"; + public const string MetadataTwitterSiteCodename = "metadata__twitter_site"; + public const string MetadataTwitterTitleCodename = "metadata__twitter_title"; + public const string OurStoryCodename = "our_story"; + public const string SitemapCodename = "sitemap"; + public const string UrlPatternCodename = "url_pattern"; + + public IEnumerable Articles { get; set; } + public IEnumerable Cafes { get; set; } + public IRichTextContent Contact { get; set; } + public IEnumerable HeroUnit { get; set; } + public string MetadataMetaDescription { get; set; } + public string MetadataMetaTitle { get; set; } + public string MetadataOgDescription { get; set; } + public IEnumerable MetadataOgImage { get; set; } + public string MetadataOgTitle { get; set; } + public string MetadataTwitterCreator { get; set; } + public string MetadataTwitterDescription { get; set; } + public IEnumerable MetadataTwitterImage { get; set; } + public string MetadataTwitterSite { get; set; } + public string MetadataTwitterTitle { get; set; } + public IEnumerable OurStory { get; set; } + public IEnumerable Sitemap { get; set; } + public IContentItemSystemAttributes System { get; set; } + public string UrlPattern { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Home.cs b/kontent-sample-app-razorpages/Models/Home.cs index dce5dfc..fbe45af 100644 --- a/kontent-sample-app-razorpages/Models/Home.cs +++ b/kontent-sample-app-razorpages/Models/Home.cs @@ -1,9 +1,3 @@ -// This code was generated by a kontent-generators-net tool -// (see https://github.com/Kentico/kontent-generators-net). -// -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// For further modifications of the class, create a separate file with the partial class. - using System; using System.Collections.Generic; using Kentico.Kontent.Delivery.Abstractions; @@ -12,42 +6,5 @@ namespace kontent_sample_app_razorpages.Models { public partial class Home { - public const string Codename = "home"; - public const string MetadataOgDescriptionCodename = "metadata__og_description"; - public const string MetadataMetaTitleCodename = "metadata__meta_title"; - public const string MetadataOgTitleCodename = "metadata__og_title"; - public const string ArticlesCodename = "articles"; - public const string HeroUnitCodename = "hero_unit"; - public const string MetadataMetaDescriptionCodename = "metadata__meta_description"; - public const string MetadataTwitterSiteCodename = "metadata__twitter_site"; - public const string OurStoryCodename = "our_story"; - public const string CafesCodename = "cafes"; - public const string MetadataTwitterImageCodename = "metadata__twitter_image"; - public const string MetadataTwitterCreatorCodename = "metadata__twitter_creator"; - public const string MetadataTwitterTitleCodename = "metadata__twitter_title"; - public const string MetadataTwitterDescriptionCodename = "metadata__twitter_description"; - public const string MetadataOgImageCodename = "metadata__og_image"; - public const string UrlPatternCodename = "url_pattern"; - public const string SitemapCodename = "sitemap"; - public const string ContactCodename = "contact"; - - public string MetadataOgDescription { get; set; } - public string MetadataMetaTitle { get; set; } - public string MetadataOgTitle { get; set; } - public IEnumerable
Articles { get; set; } - public IEnumerable HeroUnit { get; set; } - public string MetadataMetaDescription { get; set; } - public string MetadataTwitterSite { get; set; } - public IEnumerable OurStory { get; set; } - public IEnumerable Cafes { get; set; } - public IEnumerable MetadataTwitterImage { get; set; } - public string MetadataTwitterCreator { get; set; } - public string MetadataTwitterTitle { get; set; } - public string MetadataTwitterDescription { get; set; } - public IEnumerable MetadataOgImage { get; set; } - public string UrlPattern { get; set; } - public IEnumerable Sitemap { get; set; } - public IRichTextContent Contact { get; set; } - public ContentItemSystemAttributes System { get; set; } } } \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/HostedVideo.Generated.cs b/kontent-sample-app-razorpages/Models/HostedVideo.Generated.cs new file mode 100644 index 0000000..207b393 --- /dev/null +++ b/kontent-sample-app-razorpages/Models/HostedVideo.Generated.cs @@ -0,0 +1,23 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class HostedVideo + { + public const string Codename = "hosted_video"; + public const string VideoHostCodename = "video_host"; + public const string VideoIdCodename = "video_id"; + + public IContentItemSystemAttributes System { get; set; } + public IEnumerable VideoHost { get; set; } + public string VideoId { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/HostedVideo.cs b/kontent-sample-app-razorpages/Models/HostedVideo.cs index 5e15d75..257a9b8 100644 --- a/kontent-sample-app-razorpages/Models/HostedVideo.cs +++ b/kontent-sample-app-razorpages/Models/HostedVideo.cs @@ -1,9 +1,3 @@ -// This code was generated by a kontent-generators-net tool -// (see https://github.com/Kentico/kontent-generators-net). -// -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// For further modifications of the class, create a separate file with the partial class. - using System; using System.Collections.Generic; using Kentico.Kontent.Delivery.Abstractions; @@ -12,12 +6,5 @@ namespace kontent_sample_app_razorpages.Models { public partial class HostedVideo { - public const string Codename = "hosted_video"; - public const string VideoIdCodename = "video_id"; - public const string VideoHostCodename = "video_host"; - - public string VideoId { get; set; } - public IEnumerable VideoHost { get; set; } - public ContentItemSystemAttributes System { get; set; } } } \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Office.Generated.cs b/kontent-sample-app-razorpages/Models/Office.Generated.cs new file mode 100644 index 0000000..03434c7 --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Office.Generated.cs @@ -0,0 +1,37 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Office + { + public const string Codename = "office"; + public const string CityCodename = "city"; + public const string CountryCodename = "country"; + public const string EmailCodename = "email"; + public const string NameCodename = "name"; + public const string PhoneCodename = "phone"; + public const string SitemapCodename = "sitemap"; + public const string StateCodename = "state"; + public const string StreetCodename = "street"; + public const string ZipCodeCodename = "zip_code"; + + public string City { get; set; } + public string Country { get; set; } + public string Email { get; set; } + public string Name { get; set; } + public string Phone { get; set; } + public IEnumerable Sitemap { get; set; } + public string State { get; set; } + public string Street { get; set; } + public IContentItemSystemAttributes System { get; set; } + public string ZipCode { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Office.cs b/kontent-sample-app-razorpages/Models/Office.cs new file mode 100644 index 0000000..2f377f9 --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Office.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Office + { + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Tweet.Generated.cs b/kontent-sample-app-razorpages/Models/Tweet.Generated.cs new file mode 100644 index 0000000..9c147a2 --- /dev/null +++ b/kontent-sample-app-razorpages/Models/Tweet.Generated.cs @@ -0,0 +1,25 @@ +// This code was generated by a kontent-generators-net tool +// (see https://github.com/Kentico/kontent-generators-net). +// +// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. +// For further modifications of the class, create a separate file with the partial class. + +using System; +using System.Collections.Generic; +using Kentico.Kontent.Delivery.Abstractions; + +namespace kontent_sample_app_razorpages.Models +{ + public partial class Tweet + { + public const string Codename = "tweet"; + public const string DisplayOptionsCodename = "display_options"; + public const string ThemeCodename = "theme"; + public const string TweetLinkCodename = "tweet_link"; + + public IEnumerable DisplayOptions { get; set; } + public IContentItemSystemAttributes System { get; set; } + public IEnumerable Theme { get; set; } + public string TweetLink { get; set; } + } +} \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Models/Tweet.cs b/kontent-sample-app-razorpages/Models/Tweet.cs index f1b3c4a..a37b2b6 100644 --- a/kontent-sample-app-razorpages/Models/Tweet.cs +++ b/kontent-sample-app-razorpages/Models/Tweet.cs @@ -1,9 +1,3 @@ -// This code was generated by a kontent-generators-net tool -// (see https://github.com/Kentico/kontent-generators-net). -// -// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. -// For further modifications of the class, create a separate file with the partial class. - using System; using System.Collections.Generic; using Kentico.Kontent.Delivery.Abstractions; @@ -12,14 +6,5 @@ namespace kontent_sample_app_razorpages.Models { public partial class Tweet { - public const string Codename = "tweet"; - public const string TweetLinkCodename = "tweet_link"; - public const string ThemeCodename = "theme"; - public const string DisplayOptionsCodename = "display_options"; - - public string TweetLink { get; set; } - public IEnumerable Theme { get; set; } - public IEnumerable DisplayOptions { get; set; } - public ContentItemSystemAttributes System { get; set; } } } \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Pages/About/About.cshtml.cs b/kontent-sample-app-razorpages/Pages/About/About.cshtml.cs index 813beef..7da4471 100644 --- a/kontent-sample-app-razorpages/Pages/About/About.cshtml.cs +++ b/kontent-sample-app-razorpages/Pages/About/About.cshtml.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks; using Kentico.Kontent.Delivery.Abstractions; +using kontent_sample_app_razorpages.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; @@ -9,7 +10,7 @@ public class AboutModel : PageModel { private readonly IDeliveryClient _deliveryClient; - public DeliveryItemResponse AboutUs { get; set; } + public IDeliveryItemResponse AboutUs { get; set; } public AboutModel(IDeliveryClient deliveryClient) { @@ -18,7 +19,7 @@ public AboutModel(IDeliveryClient deliveryClient) public async Task OnGetAsync() { - AboutUs = await _deliveryClient.GetItemAsync("about_us"); + AboutUs = await _deliveryClient.GetItemAsync("about_us"); return Page(); } diff --git a/kontent-sample-app-razorpages/Pages/Articles/Detail.cshtml.cs b/kontent-sample-app-razorpages/Pages/Articles/Detail.cshtml.cs index c70aa84..67cdb08 100644 --- a/kontent-sample-app-razorpages/Pages/Articles/Detail.cshtml.cs +++ b/kontent-sample-app-razorpages/Pages/Articles/Detail.cshtml.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -using Kentico.Kontent.Delivery; using Kentico.Kontent.Delivery.Abstractions; +using Kentico.Kontent.Delivery.Urls.QueryParameters.Filters; using kontent_sample_app_razorpages.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; diff --git a/kontent-sample-app-razorpages/Pages/Articles/Index.cshtml.cs b/kontent-sample-app-razorpages/Pages/Articles/Index.cshtml.cs index 7700ac8..f212b70 100644 --- a/kontent-sample-app-razorpages/Pages/Articles/Index.cshtml.cs +++ b/kontent-sample-app-razorpages/Pages/Articles/Index.cshtml.cs @@ -1,9 +1,9 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.RazorPages; using kontent_sample_app_razorpages.Models; -using Kentico.Kontent.Delivery; using Microsoft.AspNetCore.Mvc; using Kentico.Kontent.Delivery.Abstractions; +using Kentico.Kontent.Delivery.Urls.QueryParameters; namespace kontent_sample_app_razorpages.Pages.Articles { @@ -11,7 +11,7 @@ public class IndexModel : PageModel { private readonly IDeliveryClient _deliveryClient; - public DeliveryItemListingResponse
Articles { get; set; } + public IDeliveryItemListingResponse
Articles { get; set; } public IndexModel(IDeliveryClient deliveryClient) { diff --git a/kontent-sample-app-razorpages/Pages/Cafes/Index.cshtml.cs b/kontent-sample-app-razorpages/Pages/Cafes/Index.cshtml.cs index 3bcd1c9..bc729a4 100644 --- a/kontent-sample-app-razorpages/Pages/Cafes/Index.cshtml.cs +++ b/kontent-sample-app-razorpages/Pages/Cafes/Index.cshtml.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Kentico.Kontent.Delivery; using Kentico.Kontent.Delivery.Abstractions; +using Kentico.Kontent.Delivery.Urls.QueryParameters; using kontent_sample_app_razorpages.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; @@ -13,7 +13,7 @@ public class IndexModel : PageModel { private readonly IDeliveryClient _deliveryClient; - public DeliveryItemResponse Home { get; set; } + public IDeliveryItemResponse Home { get; set; } public List CompanyCafes { get; set; } diff --git a/kontent-sample-app-razorpages/Pages/Coffees/Detail.cshtml.cs b/kontent-sample-app-razorpages/Pages/Coffees/Detail.cshtml.cs index fcfd1c0..04a653b 100644 --- a/kontent-sample-app-razorpages/Pages/Coffees/Detail.cshtml.cs +++ b/kontent-sample-app-razorpages/Pages/Coffees/Detail.cshtml.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -using Kentico.Kontent.Delivery; using Kentico.Kontent.Delivery.Abstractions; +using Kentico.Kontent.Delivery.Urls.QueryParameters.Filters; using kontent_sample_app_razorpages.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; diff --git a/kontent-sample-app-razorpages/Pages/Coffees/Index.cshtml.cs b/kontent-sample-app-razorpages/Pages/Coffees/Index.cshtml.cs index 817e6a8..56a4c14 100644 --- a/kontent-sample-app-razorpages/Pages/Coffees/Index.cshtml.cs +++ b/kontent-sample-app-razorpages/Pages/Coffees/Index.cshtml.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -using Kentico.Kontent.Delivery; using Kentico.Kontent.Delivery.Abstractions; +using Kentico.Kontent.Delivery.Urls.QueryParameters; using kontent_sample_app_razorpages.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; @@ -11,7 +11,7 @@ public class IndexModel : PageModel { private readonly IDeliveryClient _deliveryClient; - public DeliveryItemListingResponse Coffee { get; set; } + public IDeliveryItemListingResponse Coffee { get; set; } public IndexModel(IDeliveryClient deliveryClient) { diff --git a/kontent-sample-app-razorpages/Pages/Components/Contact/ContactViewComponent.cs b/kontent-sample-app-razorpages/Pages/Components/Contact/ContactViewComponent.cs index 8e0e8b7..f2c6bfc 100644 --- a/kontent-sample-app-razorpages/Pages/Components/Contact/ContactViewComponent.cs +++ b/kontent-sample-app-razorpages/Pages/Components/Contact/ContactViewComponent.cs @@ -1,5 +1,6 @@ using Kentico.Kontent.Delivery; using Kentico.Kontent.Delivery.Abstractions; +using Kentico.Kontent.Delivery.Urls.QueryParameters; using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; diff --git a/kontent-sample-app-razorpages/Pages/Contacts/Index.cshtml.cs b/kontent-sample-app-razorpages/Pages/Contacts/Index.cshtml.cs index 6033cb8..8ac8338 100644 --- a/kontent-sample-app-razorpages/Pages/Contacts/Index.cshtml.cs +++ b/kontent-sample-app-razorpages/Pages/Contacts/Index.cshtml.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Kentico.Kontent.Delivery; using Kentico.Kontent.Delivery.Abstractions; +using Kentico.Kontent.Delivery.Urls.QueryParameters.Filters; using kontent_sample_app_razorpages.Models; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; @@ -15,7 +15,7 @@ public class IndexModel : PageModel public Cafe Roastery { get; set; } - public IReadOnlyList Cafes { get; set; } + public IList Cafes { get; set; } public IndexModel(IDeliveryClient deliveryClient) { diff --git a/kontent-sample-app-razorpages/Pages/Home/Index.cshtml.cs b/kontent-sample-app-razorpages/Pages/Home/Index.cshtml.cs index 1a96aab..60fbca0 100644 --- a/kontent-sample-app-razorpages/Pages/Home/Index.cshtml.cs +++ b/kontent-sample-app-razorpages/Pages/Home/Index.cshtml.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -using Kentico.Kontent.Delivery; using Kentico.Kontent.Delivery.Abstractions; +using Kentico.Kontent.Delivery.Urls.QueryParameters; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; @@ -10,7 +10,7 @@ public class IndexModel : PageModel { private readonly IDeliveryClient _deliveryClient; - public DeliveryItemResponse Home { get; set; } + public IDeliveryItemResponse Home { get; set; } public IndexModel(IDeliveryClient deliveryClient) { @@ -19,8 +19,8 @@ public IndexModel(IDeliveryClient deliveryClient) public async Task OnGetAsync() { - Home = await _deliveryClient.GetItemAsync( - kontent_sample_app_razorpages.Models.Home.Codename, + Home = await _deliveryClient.GetItemAsync( + Models.Home.Codename, new DepthParameter(3) ); diff --git a/kontent-sample-app-razorpages/Resolvers/CustomLinkUrlResolver.cs b/kontent-sample-app-razorpages/Resolvers/CustomLinkUrlResolver.cs index 26a2c04..b3088c1 100644 --- a/kontent-sample-app-razorpages/Resolvers/CustomLinkUrlResolver.cs +++ b/kontent-sample-app-razorpages/Resolvers/CustomLinkUrlResolver.cs @@ -1,24 +1,25 @@ using Kentico.Kontent.Delivery.Abstractions; +using System.Threading.Tasks; namespace kontent_sample_app_razorpages.Resolvers { public class CustomContentLinkUrlResolver : IContentLinkUrlResolver { - public string ResolveLinkUrl(ContentLink link) + public async Task ResolveLinkUrlAsync(IContentLink link) { // Resolves URLs to content items based on the 'accessory' content type - return link.ContentTypeCodename switch + return await Task.FromResult(link.ContentTypeCodename switch { - "article" => $"/Articles/Detail/{link.UrlSlug}", - "coffee" => $"/Coffees/Detail/{link.UrlSlug}", + "article" => $"/Articles/Detail/{link.UrlSlug}", + "coffee" => $"/Coffees/Detail/{link.UrlSlug}", _ => "/404", - }; + }); } - public string ResolveBrokenLinkUrl() + public Task ResolveBrokenLinkUrlAsync() { // Resolves URLs to unavailable content items - return "/404"; + return Task.FromResult("/404"); } } } diff --git a/kontent-sample-app-razorpages/Resolvers/HostedVideoResolver.cs b/kontent-sample-app-razorpages/Resolvers/HostedVideoResolver.cs index 2f3cae5..168c3f3 100644 --- a/kontent-sample-app-razorpages/Resolvers/HostedVideoResolver.cs +++ b/kontent-sample-app-razorpages/Resolvers/HostedVideoResolver.cs @@ -1,4 +1,4 @@ -using Kentico.Kontent.Delivery.Abstractions.InlineContentItems; +using Kentico.Kontent.Delivery.Abstractions; using kontent_sample_app_razorpages.Models; using System.Linq; diff --git a/kontent-sample-app-razorpages/Resolvers/TweetResolver.cs b/kontent-sample-app-razorpages/Resolvers/TweetResolver.cs index bdfd5a7..d6520a1 100644 --- a/kontent-sample-app-razorpages/Resolvers/TweetResolver.cs +++ b/kontent-sample-app-razorpages/Resolvers/TweetResolver.cs @@ -1,5 +1,6 @@ -using Kentico.Kontent.Delivery.Abstractions.InlineContentItems; +using Kentico.Kontent.Delivery.Abstractions; using kontent_sample_app_razorpages.Models; +using System.Linq; namespace kontent_sample_app_razorpages.Resolvers { diff --git a/kontent-sample-app-razorpages/Startup.cs b/kontent-sample-app-razorpages/Startup.cs index 1816153..b135dc8 100644 --- a/kontent-sample-app-razorpages/Startup.cs +++ b/kontent-sample-app-razorpages/Startup.cs @@ -6,6 +6,7 @@ using kontent_sample_app_razorpages.Resolvers; using kontent_sample_app_razorpages.Models; using Kentico.Kontent.Delivery.Abstractions; +using Kentico.Kontent.Delivery.Extensions; namespace kontent_sample_app_razorpages { diff --git a/kontent-sample-app-razorpages/kontent-sample-app-razorpages.csproj b/kontent-sample-app-razorpages/kontent-sample-app-razorpages.csproj index 3d52655..96fc3ec 100644 --- a/kontent-sample-app-razorpages/kontent-sample-app-razorpages.csproj +++ b/kontent-sample-app-razorpages/kontent-sample-app-razorpages.csproj @@ -9,7 +9,7 @@ - + From a40f8e6737870eb5eda49ef3da8c47525273e70a Mon Sep 17 00:00:00 2001 From: MichaelB Date: Mon, 26 Oct 2020 14:33:00 -0400 Subject: [PATCH 2/3] Changed date display format for Articles --- kontent-sample-app-razorpages/Models/Article.Generated.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kontent-sample-app-razorpages/Models/Article.Generated.cs b/kontent-sample-app-razorpages/Models/Article.Generated.cs index c4cac06..fa59541 100644 --- a/kontent-sample-app-razorpages/Models/Article.Generated.cs +++ b/kontent-sample-app-razorpages/Models/Article.Generated.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using Kentico.Kontent.Delivery.Abstractions; namespace kontent_sample_app_razorpages.Models @@ -49,6 +50,7 @@ public partial class Article public string MetaDescription { get; set; } public string MetaKeywords { get; set; } public IEnumerable Personas { get; set; } + [DisplayFormat(DataFormatString = "{0:MMM. dd, yyyy}")] public DateTime? PostDate { get; set; } public IEnumerable RelatedArticles { get; set; } public IEnumerable Sitemap { get; set; } From 070d7dd8ad498d3f107a32936144a3164b278a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0vihl=C3=ADk?= Date: Mon, 26 Oct 2020 20:58:47 +0100 Subject: [PATCH 3/3] approval changes --- kontent-sample-app-razorpages/.config/dotnet-tools.json | 2 +- kontent-sample-app-razorpages/Models/Article.Generated.cs | 4 +--- kontent-sample-app-razorpages/Models/Article.cs | 3 +++ kontent-sample-app-razorpages/Pages/Articles/Detail.cshtml | 2 +- kontent-sample-app-razorpages/Tools/GenerateModels.ps1 | 2 +- .../kontent-sample-app-razorpages.csproj | 1 + 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/kontent-sample-app-razorpages/.config/dotnet-tools.json b/kontent-sample-app-razorpages/.config/dotnet-tools.json index 7452d21..ef08478 100644 --- a/kontent-sample-app-razorpages/.config/dotnet-tools.json +++ b/kontent-sample-app-razorpages/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "kentico.kontent.modelgenerator": { - "version": "5.0.0-beta2", + "version": "6.0.0", "commands": [ "KontentModelGenerator" ] diff --git a/kontent-sample-app-razorpages/Models/Article.Generated.cs b/kontent-sample-app-razorpages/Models/Article.Generated.cs index fa59541..da24088 100644 --- a/kontent-sample-app-razorpages/Models/Article.Generated.cs +++ b/kontent-sample-app-razorpages/Models/Article.Generated.cs @@ -6,7 +6,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using Kentico.Kontent.Delivery.Abstractions; namespace kontent_sample_app_razorpages.Models @@ -36,7 +35,7 @@ public partial class Article public const string TitleCodename = "title"; public const string UrlPatternCodename = "url_pattern"; - public string BodyCopy { get; set; } + public IRichTextContent BodyCopy { get; set; } public string MetadataMetaDescription { get; set; } public string MetadataMetaTitle { get; set; } public string MetadataOgDescription { get; set; } @@ -50,7 +49,6 @@ public partial class Article public string MetaDescription { get; set; } public string MetaKeywords { get; set; } public IEnumerable Personas { get; set; } - [DisplayFormat(DataFormatString = "{0:MMM. dd, yyyy}")] public DateTime? PostDate { get; set; } public IEnumerable RelatedArticles { get; set; } public IEnumerable Sitemap { get; set; } diff --git a/kontent-sample-app-razorpages/Models/Article.cs b/kontent-sample-app-razorpages/Models/Article.cs index 315d366..40dba07 100644 --- a/kontent-sample-app-razorpages/Models/Article.cs +++ b/kontent-sample-app-razorpages/Models/Article.cs @@ -1,10 +1,13 @@ using System; using System.Collections.Generic; using Kentico.Kontent.Delivery.Abstractions; +using Newtonsoft.Json; namespace kontent_sample_app_razorpages.Models { public partial class Article { + [JsonProperty("body_copy")] + public string BodyCopyString { get; set; } } } \ No newline at end of file diff --git a/kontent-sample-app-razorpages/Pages/Articles/Detail.cshtml b/kontent-sample-app-razorpages/Pages/Articles/Detail.cshtml index e20f092..a402456 100644 --- a/kontent-sample-app-razorpages/Pages/Articles/Detail.cshtml +++ b/kontent-sample-app-razorpages/Pages/Articles/Detail.cshtml @@ -21,7 +21,7 @@
- @Html.Raw(Model.Article.BodyCopy) + @Html.Raw(Model.Article.BodyCopyString)
diff --git a/kontent-sample-app-razorpages/Tools/GenerateModels.ps1 b/kontent-sample-app-razorpages/Tools/GenerateModels.ps1 index 232ce36..9b79265 100644 --- a/kontent-sample-app-razorpages/Tools/GenerateModels.ps1 +++ b/kontent-sample-app-razorpages/Tools/GenerateModels.ps1 @@ -1,3 +1,3 @@ dotnet tool restore $OUTPUT_PATH = Join-Path $PSScriptRoot "..\Models" -dotnet tool run KontentModelGenerator -p "975bf280-fd91-488c-994c-2f04416e5ee3" -o $OUTPUT_PATH -n "kontent_sample_app_razorpages.Models" -g=false -s=true \ No newline at end of file +dotnet tool run KontentModelGenerator -p "975bf280-fd91-488c-994c-2f04416e5ee3" -o $OUTPUT_PATH -n "kontent_sample_app_razorpages.Models" -s=true \ No newline at end of file diff --git a/kontent-sample-app-razorpages/kontent-sample-app-razorpages.csproj b/kontent-sample-app-razorpages/kontent-sample-app-razorpages.csproj index 96fc3ec..60150fa 100644 --- a/kontent-sample-app-razorpages/kontent-sample-app-razorpages.csproj +++ b/kontent-sample-app-razorpages/kontent-sample-app-razorpages.csproj @@ -5,6 +5,7 @@ InProcess kontent_sample_app_razorpages kontent-sample-app-razorpages + fdbd2a40-72c9-4f17-9a13-bffb343ae2ea