diff --git a/OliverBooth/Data/Web/Configuration/TutorialArticleConfiguration.cs b/OliverBooth/Data/Web/Configuration/TutorialArticleConfiguration.cs index 7e859df..c5c0ea1 100644 --- a/OliverBooth/Data/Web/Configuration/TutorialArticleConfiguration.cs +++ b/OliverBooth/Data/Web/Configuration/TutorialArticleConfiguration.cs @@ -25,5 +25,6 @@ internal sealed class TutorialArticleConfiguration : IEntityTypeConfiguration e.NextPart); builder.Property(e => e.PreviousPart); builder.Property(e => e.Visibility).HasConversion>(); + builder.Property(e => e.EnableComments).IsRequired(); } } diff --git a/OliverBooth/Data/Web/ITutorialArticle.cs b/OliverBooth/Data/Web/ITutorialArticle.cs index a25c4ef..bbb398a 100644 --- a/OliverBooth/Data/Web/ITutorialArticle.cs +++ b/OliverBooth/Data/Web/ITutorialArticle.cs @@ -11,6 +11,14 @@ public interface ITutorialArticle /// The body. string Body { get; } + /// + /// Gets a value indicating whether comments are enabled for the article. + /// + /// + /// if comments are enabled for the article; otherwise, . + /// + bool EnableComments { get; } + /// /// Gets the excerpt of this article, if it has one. /// diff --git a/OliverBooth/Data/Web/TutorialArticle.cs b/OliverBooth/Data/Web/TutorialArticle.cs index 91132ae..88b21f1 100644 --- a/OliverBooth/Data/Web/TutorialArticle.cs +++ b/OliverBooth/Data/Web/TutorialArticle.cs @@ -8,6 +8,9 @@ internal sealed class TutorialArticle : IEquatable, ITutorialAr /// public string Body { get; private set; } = string.Empty; + /// + public bool EnableComments { get; internal set; } + /// public string? Excerpt { get; private set; }