Add BlogPostViewModel for view specific processing
This commit is contained in:
parent
647696aa92
commit
dda522d221
6 changed files with 34 additions and 18 deletions
21
Website/ViewModels/BlogPostViewModel.cs
Normal file
21
Website/ViewModels/BlogPostViewModel.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
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; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue