/// <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); }
public Category GetById(int id) { SharePointListItem currentItem = provider.GetListItembyID(ForumConstants.Lists_Category, id); return(CategoryMapper.CreateDomainObject(currentItem)); }