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; }
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; }