public SurveyPart CreatePart(SurveyPart part)
        {
            var title = part.As<TitlePart>();
            var body = part.As<BodyPart>();

            var innerSurvey = part.Survey;
            innerSurvey.Name = title.Title;
            innerSurvey.HtmlContent = body.Text;

            part.Survey = innerSurvey;

            Add(innerSurvey);

            part.SurveyId = innerSurvey.Id;

            _contentManager.Create(part.ContentItem);

            return part;
        }
        public void UpdatePart(SurveyPart part)
        {
            _contentManager.Publish(part.ContentItem);

            var title = part.As<TitlePart>();
            var body = part.As<BodyPart>();

            // update the survey...
            part.Survey.Name = title.Title;
            part.Survey.HtmlContent = body.Text;

            Save(part.Survey);
        }