The next generation of the Teknik Services. Written in ASP.NET.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

58 lines
1.4 KiB

using System;
using System.Collections.Generic;
using Teknik.Areas.Blog.Models;
using System.Security.Principal;
using System.Linq;
using System.Web;
using Teknik.ViewModels;
namespace Teknik.Areas.Blog.ViewModels
{
public class PostViewModel : ViewModelBase
{
public int PostId { get; set; }
public int BlogId { get; set; }
public Models.Blog Blog { get; set; }
public bool System { get; set; }
public DateTime DatePosted { get; set; }
public DateTime DatePublished { get; set; }
public DateTime DateEdited { get; set; }
public bool Published { get; set; }
public string Title { get; set; }
public string Article { get; set; }
public List<string> Tags { get; set; }
public List<BlogPostComment> Comments { get; set; }
public PostViewModel()
{
}
public PostViewModel(BlogPost post)
{
BlogId = post.BlogId;
PostId = post.BlogPostId;
Blog = post.Blog;
System = post.System;
DatePosted = post.DatePosted;
Published = post.Published;
DatePublished = post.DatePublished;
DateEdited = post.DateEdited;
Title = post.Title;
Tags = post.Tags;
Article = post.Article;
Comments = post.Comments;
}
}
}