Example #1
0
        public PostViewModel(Post post, IList<Category> allCategories)
        {
            Post = post;

            AllCategories = new List<PostCategory>();
            foreach (Category c in allCategories)
            {
                AllCategories.Add(new PostCategory(c, OnPost(c.Id)));
            }
        }
Example #2
0
 public PostViewModel(Post post)
     : this(post, new List<Category>())
 {
 }