public ActionResult SaveAndContinue(NewsletterModel model)
        {
            if (!CheckPermission(NewsletterPermissions.ManageNewsletters))
            {
                return(new HttpUnauthorizedResult());
            }

            Newsletter entity = null;

            if (model.Id != Guid.Empty)
            {
                entity = newsletterService.GetById(model.Id);
            }
            else
            {
                entity = new Newsletter {
                    DateCreated = DateTime.UtcNow
                };
            }

            entity.Title       = model.Title;
            entity.BodyContent = model.BodyContent;
            entity.CultureCode = model.CultureCode;
            entity.RefId       = model.RefId;

            newsletterService.Save(entity);

            return(null);
        }
        public IActionResult SaveNewsLetter(NewsLetterViewModel newsLetterVm)
        {
            if (!ModelState.IsValid)
            {
                return(new OkObjectResult(false));
            }

            if (newsLetterVm.Id != 0)
            {
                _newsLetterService.UpdateNewsLetter(newsLetterVm);
            }
            else
            {
                _newsLetterService.AddNewsLetter(newsLetterVm);
            }

            _newsLetterService.Save();
            return(new OkObjectResult(true));
        }