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.

BlogViewModel.cs 930B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Teknik.Areas.Blog.Models;
  7. using Teknik.Areas.Users.Models;
  8. using Teknik.ViewModels;
  9. namespace Teknik.Areas.Blog.ViewModels
  10. {
  11. public class BlogViewModel : ViewModelBase
  12. {
  13. public int BlogId { get; set; }
  14. public int UserId { get; set; }
  15. public string Title { get; set; }
  16. public string Description { get; set; }
  17. public User User { get; set; }
  18. public bool HasPosts { get; set; }
  19. public BlogViewModel()
  20. {
  21. }
  22. public BlogViewModel(Models.Blog blog)
  23. {
  24. BlogId = blog.BlogId;
  25. UserId = blog.UserId;
  26. Title = blog.User.BlogSettings.Title;
  27. Description = blog.User.BlogSettings.Description;
  28. User = blog.User;
  29. HasPosts = false;
  30. }
  31. }
  32. }