示例#1
0
        public ForumCategoryCollection(IForumCategoryContext forumCategoryContext)
        {
            ForumCategories = new List <IForumCategory>();
            db = forumCategoryContext;
            List <IForumCategoryDto> forumCategoryDtos = db.GetForumCategories();

            foreach (IForumCategoryDto forumCategoryDto in forumCategoryDtos)
            {
                ForumCategories.Add(new ForumCategory(DataHandlerFactory.DataHandlerFactory.GetForumCategoryContext())
                {
                    ForumCategoryID     = forumCategoryDto.ForumCategoryID,
                    ForumCategoryString = forumCategoryDto.ForumCategoryString
                });
            }
        }
示例#2
0
 public ForumCategory(IForumCategoryContext forumCategoryContext)
 {
     db = forumCategoryContext;
 }