public void AddMultiQuestion(MultiChoiceQModel multiChoice, int chapterID, int surveyID) { MultichoiceQuestion multichoiceQuestion = new MultichoiceQuestion { Question = multiChoice.Question, OwnOption = multiChoice.OwnOption, }; var multiQuestionItem = _mr.Add(multichoiceQuestion); var optionsList = AddOption(multiChoice.Options); //---- finns längre upp så länge AddMultiQuestion_Options(optionsList, multiQuestionItem.ID); AddMultiQuestion_Survey(surveyID, chapterID, multiQuestionItem.ID, multiChoice.Order); }
public void Add(int surveyID, MultichoiceQuestion_OptionsModel multichoiceQuestion_Options) { MultichoiceQuestion multichoiceQuestion = new MultichoiceQuestion { Question = multichoiceQuestion_Options.MultiChoiceQuestion, OwnOption = multichoiceQuestion_Options.OwnOption }; var multichoice = _mr.Add(multichoiceQuestion); List <Options> optionsList = AddOption(multichoiceQuestion_Options); var optionsitem = _or.AddRange(optionsList); AddMultiQuestion_Options(optionsitem, multichoice.ID); AddMultiQuestion_Survey(surveyID, multichoice.ID); }