private ViewFaqViewModel retrieveFaq(FaqPart faqPart)
 {
     ViewFaqViewModel model = new ViewFaqViewModel();
     BodyPart bodyPart = faqPart.ContentItem.As<BodyPart>();
     if (bodyPart != null && bodyPart.Text != null)
     {
         model.Answer = bodyPart.Text;
     }
     else
     {
         model.Answer = string.Empty;
     }
     model.Question = faqPart.Question;
     model.Id = faqPart.Id;
     return model;
 }
Example #2
0
        private ViewFaqViewModel retrieveFaq(FaqPart faqPart)
        {
            ViewFaqViewModel model    = new ViewFaqViewModel();
            BodyPart         bodyPart = faqPart.ContentItem.As <BodyPart>();

            if (bodyPart != null && bodyPart.Text != null)
            {
                model.Answer = bodyPart.Text;
            }
            else
            {
                model.Answer = string.Empty;
            }
            model.Question = faqPart.Question;
            model.Id       = faqPart.Id;
            return(model);
        }