예제 #1
0
 protected virtual ForumGroupModel PrepareForumGroupModel(ForumGroup forumGroup)
 {
     var forumGroupModel = new ForumGroupModel
     {
         Id = forumGroup.Id,
         Name = forumGroup.Name,
         SeName = forumGroup.GetSeName(),
     };
     var forums = _forumService.GetAllForumsByGroupId(forumGroup.Id);
     foreach (var forum in forums)
     {
         var forumModel = PrepareForumRowModel(forum);
         forumGroupModel.Forums.Add(forumModel);
     }
     return forumGroupModel;
 }
예제 #2
0
 private ForumGroupModel PrepareForumGroupModel(ForumGroup forumGroup)
 {
     var forumGroupModel = new ForumGroupModel()
     {
         Id = forumGroup.Id,
         Name = forumGroup.Name,
         SeName = forumGroup.GetSeName(),
         Description = forumGroup.Description,
     };
     var forums = _forumService.GetAllForumsByGroupId(forumGroup.Id);
     foreach (var forum in forums)
     {
         var forumModel = PrepareForumRowModel(forum);
         forumGroupModel.Forums.Add(forumModel);
     }
     return forumGroupModel;
 }