public async Task <HttpStatusCodeResult> EditBackgroundImage(EditBackgroundImageViewModel model)
        {
            try
            {
                var selectedBackgroundImage = await _imageService.GetAsync(model.BackgroundImageId);

                await _sectionService.EditBackgroundImageAsync(model.SectionId, selectedBackgroundImage.CDNImagePath(), selectedBackgroundImage.ImageCategory);

                await _sectionService.EditBackgroundTypeAsync(model.SectionId, true);

                return(new HttpStatusCodeResult(HttpStatusCode.NoContent));
            }
            catch (Exception)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.InternalServerError));
            }
        }
        public async Task <ActionResult> EditBackgroundImage(int pageAssociationId)
        {
            var pageAssociation = await _associationService.GetAsync(pageAssociationId);

            var pageSection = await _sectionService.GetAsync(pageAssociation.PageSection.PageSectionId);

            var model = new EditBackgroundImageViewModel
            {
                PageAssociationId = pageAssociationId,
                SectionId         = pageSection.PageSectionId,
                MediaLibrary      = new PaginationViewModel
                {
                    ImageList        = await _imageService.GetAsync(),
                    TargetInputField = "BackgroundImageId",
                    PaginationType   = "section"
                },
            };

            return(PartialView("_EditBackgroundImage", model));
        }