The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
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.

CommentViewModel.cs 876B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using Teknik.Areas.Blog.Models;
  6. using Teknik.Areas.Profile.Models;
  7. namespace Teknik.Areas.Blog.ViewModels
  8. {
  9. public class CommentViewModel
  10. {
  11. public int CommentId { get; set; }
  12. public int PostId { get; set; }
  13. public Post Post { get; set; }
  14. public int? UserId { get; set; }
  15. public User User { get; set; }
  16. public DateTime DatePosted { get; set; }
  17. public string Article { get; set; }
  18. public CommentViewModel(Comment comment)
  19. {
  20. CommentId = comment.CommentId;
  21. PostId = comment.PostId;
  22. Post = comment.Post;
  23. UserId = comment.UserId;
  24. User = comment.User;
  25. DatePosted = comment.DatePosted;
  26. Article = comment.Article;
  27. }
  28. }
  29. }