public void Save(CategoryCollection collection)
		{
			foreach(Category category in collection)
			{
				_dao.Save(category);
			}
		}
Exemple #2
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;
		}