/// <summary> /// Not my favorite but passing in the /// response adding the components to it /// and then returning /// </summary> /// <param name="resp"></param> public void BuildComponentsResponse(QuestionResponse resp) { using (CSET_Context context = new CSET_Context()) { var list = context.usp_Answer_Components_Default(this.assessmentID).Cast <Answer_Components_Base>().ToList(); //.Where(x => x.Assessment_Id == this.assessmentID).Cast<Answer_Components_Base>() //.OrderBy(x => x.Question_Group_Heading).ThenBy(x => x.Universal_Sub_Category).ToList(); AddResponse(resp, context, list, "Component Defaults"); BuildOverridesOnly(resp, context); } }
/// <summary> /// Gathers applicable questions for the assessment's network components as defined the by Diagram. /// </summary> /// <param name="resp"></param> public QuestionResponse GetResponse() { var resp = new QuestionResponse(); resp.Domains = new List <Domain>(); using (CSET_Context context = new CSET_Context()) { var list = context.usp_Answer_Components_Default(this.assessmentID).Cast <Answer_Components_Base>().ToList(); AddResponse(resp, context, list, "Component Defaults"); BuildOverridesOnly(resp, context); } return(resp); }