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

LoadReadOnlySurvey() public method

Loads a completed survey using the ResponseHeader ID for the User/Survey.
public LoadReadOnlySurvey ( int responseHeaderId, int moduleId ) : ReadonlySurvey
responseHeaderId int The ID.
moduleId int The module ID.
return ReadonlySurvey
        public ReadonlySurvey LoadReadOnlySurvey(int responseHeaderId, int moduleId)
        {
            return (from response in this.LoadReadOnlySurveys()
                    join surveyDefinition in this.Context.Surveys on response.SurveyId equals surveyDefinition.SurveyId
                   where response.ResponseHeaderId == responseHeaderId
                      && surveyDefinition.ModuleId == moduleId
                   select response).SingleOrDefault();
        }