public override void DeleteCategory(Category category)
        {
            using (TransactionScope transaction = new TransactionScope(mConfiguration))
            {
                CategoryDataStore dataStore = new CategoryDataStore(transaction);

                // Delete should only be allowed if the following conditions are true:
                // 1. There are no child categories.
                if (dataStore.FindByChildOfCategory(category.Id).Count > 0)
                {
                    throw new SchemaIntegrityException("Category has child categories");
                }

                // 2. There are no articles associated with this category.
                ArticleDataStore ads = new ArticleDataStore(transaction);
                if (ads.FindByCategory(category).Count > 0)
                {
                    throw new SchemaIntegrityException("Articles are associated with this category");
                }

                // Delete all access items.
                AccessLayer.AccessDataStore accessDs  = new AccessLayer.AccessDataStore(transaction);
                IList <AccessLayer.Access>  allAccess = accessDs.FindAllByItem(category.Id);

                foreach (AccessLayer.Access access in allAccess)
                {
                    access.Deleted = true;
                    accessDs.Update(access);
                }

                category.Deleted = true;
                dataStore.Update(category);
                transaction.Commit();
            }
        }
        public override void UpdateCategory(Category category)
        {
            using (TransactionScope transaction = new TransactionScope(mConfiguration))
            {
                CategoryDataStore dataStore = new CategoryDataStore(transaction);

                dataStore.Update(category);

                transaction.Commit();
            }
        }