website/Website/ViewModels/BlogPostViewModel.cs

21 lines
No EOL
460 B
C#

using System;
using Website.Models;
namespace Website.ViewModels
{
public class BlogPostViewModel
{
public BlogPostViewModel(BlogPost blogPost)
{
Title = blogPost.Title;
Content = blogPost.Content;
Timestamp = blogPost.Timestamp;
Url = blogPost.Url;
}
public string Title { get; private set; }
public string Content { get; private set; }
public DateTime Timestamp { get; private set; }
public string Url { get; private set; }
}
}