/// <summary>
        ///
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        public VLLibraryQuestionCategory UpdateLibraryQuestionCategory(VLLibraryQuestionCategory category)
        {
            if (category == null)
            {
                throw new ArgumentNullException("category");
            }
            category.ValidateInstance();

            #region SecurityLayer
            if (this.PrincipalType == Core.PrincipalType.SystemUser)
            {
                CheckPermissions(VLPermissions.ManageSystem, VLPermissions.Developer, VLPermissions.SystemService, VLPermissions.ManageBuidingBlocks);
            }
            else
            {
                throw new VLAccessDeniedException();
            }
            #endregion

            /*Το name κάθε κατηγορίας πρέπει να είναι μοναδικό*/
            var existingItem = LibrariesDal.GetLibraryQuestionCategoryByName(this.AccessTokenId, category.Name, category.TextsLanguage);
            if (existingItem != null && existingItem.CategoryId != category.CategoryId)
            {
                throw new VLException(SR.GetString(SR.Value_is_already_in_use, "Name", category.Name));
            }
            if (existingItem == null)
            {
                existingItem = LibrariesDal.GetLibraryQuestionCategoryById(AccessTokenId, category.CategoryId, category.TextsLanguage);
            }
            if (existingItem == null)
            {
                throw new VLException(SR.GetString(SR.There_is_no_item_with_id, "LibraryQuestionCategory", category.CategoryId));
            }

            existingItem.AttributeFlags = category.AttributeFlags;
            existingItem.Name           = category.Name;

            return(LibrariesDal.UpdateLibraryQuestionCategory(this.AccessTokenId, existingItem));
        }