Basic post management

This commit is contained in:
Robert Marshall 2020-01-03 11:16:12 +00:00
parent 44875a6a45
commit 8f0c4c0a45
4 changed files with 65 additions and 5 deletions

View file

@ -7,8 +7,8 @@ namespace Website.ViewModels
{
public class BlogPostViewModel
{
public BlogPostViewModel(BlogPost blogPost)
{
public BlogPostViewModel(BlogPost blogPost) {
Id = blogPost.Id;
Title = blogPost.Title;
Timestamp = FormatTimestamp(blogPost.Timestamp);
Url = blogPost.Url;
@ -44,6 +44,7 @@ namespace Website.ViewModels
.UseSyntaxHighlighting()
.Build();
public int Id { get; }
public string Title { get; }
public string Content { get; protected set; }
public string Timestamp { get; }