public async Task <IActionResult> OnPostDataAsync(string id)
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            var page = MapToPage();

            if (string.IsNullOrEmpty(id))
            {
                await _pagesService.CreateAsync(page);
            }
            else
            {
                await _pagesService.UpdateAsync(page);
            }

            return(RedirectToPage("/adminpages"));
        }