Engage.Survey.Entities.SurveyRepository.LoadReadOnlySection C# (CSharp) Method

LoadReadOnlySection() public method

Loads the given completed section.
public LoadReadOnlySection ( int responseHeaderId, int sectionId ) : ReadonlySection
responseHeaderId int The ID of the of the completed survey.
sectionId int The ID of the section.
return ReadonlySection
        public ReadonlySection LoadReadOnlySection(int responseHeaderId, int sectionId)
        {
            return (from response in this.Context.Responses
                    where response.ResponseHeaderId == responseHeaderId && response.SectionId == sectionId
                    select new ReadonlySection
                                {
                                        SurveyId = response.SurveyId,
                                        SectionId = response.SectionId,
                                        Text = response.SectionText,
                                        ShowText = response.ShowSectionText,
                                        RelativeOrder = response.SectionRelativeOrder,
                                        ResponseHeaderId = response.ResponseHeaderId
                                }).FirstOrDefault();
        }