Example #1
0
        /// <summary>
        /// Deletes the specified request.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>
        ///   <c>DeleteNodeResponse</c> with success status.
        /// </returns>
        public DeleteNodeResponse Delete(DeleteNodeRequest request)
        {
            if (request.Data == null || request.CategoryTreeId.HasDefaultValue() || request.Id.HasDefaultValue())
            {
                return new DeleteNodeResponse { Data = false };
            }
            
            categoryService.DeleteCategoryNode(request.Id, request.Data.Version, request.CategoryTreeId);

            return new DeleteNodeResponse { Data = true };
        }
Example #2
0
        /// <summary>
        /// Deletes the specified request.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>
        ///   <c>DeleteNodeResponse</c> with success status.
        /// </returns>
        public DeleteNodeResponse Delete(DeleteNodeRequest request)
        {
            if (request.Data == null || request.SitemapId.HasDefaultValue() || request.Id.HasDefaultValue())
            {
                return new DeleteNodeResponse { Data = false };
            }

            sitemapService.DeleteNode(request.Id, request.Data.Version, request.SitemapId);

            return new DeleteNodeResponse { Data = true };
        }