Esempio n. 1
0
        /// <summary>
        /// Gets a collection of all categories in the system.
        /// </summary>
        /// <returns></returns>
        public CategoryCollection GetAll()
        {
            SharePointListDescriptor items = provider.GetAllListItems(ForumConstants.Lists_Category);

            CategoryCollection categoryCollection = new CategoryCollection();

            foreach (SharePointListItem listItem in items.SharePointListItems)
            {
                categoryCollection.Add(CategoryMapper.CreateDomainObject(listItem));
            }
            return(categoryCollection);
        }
Esempio n. 2
0
        public Category GetById(int id)
        {
            SharePointListItem currentItem = provider.GetListItembyID(ForumConstants.Lists_Category, id);

            return(CategoryMapper.CreateDomainObject(currentItem));
        }