public static QuizQuestionsVM SetSubData(QuizQuestions data, Guid aid, bool isSurvey)
        {
            var model = QuizQuestionsVM.MToVM(data);

            model.Images  = ImageLinkStorageVM.MsToVMs(ImageLinkStorageService.GetByOIDAPI(data.ID, aid));
            model.Status  = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(data.Status));
            model.Choices = isSurvey? QuizQuestionAnswerService.SetSurveyFormats(QuizQuestionAnswerService.GetByQQID(data.ID), aid, data.QuizInfoID) : QuizQuestionAnswerService.SetSubDatas(QuizQuestionAnswerService.GetByQQID(data.ID), aid);
            return(model);
        }
 public static bool Remove(Guid id, Guid qiid, Guid aid, Guid cid)
 {
     try {
         using (var context = new CentralProcessContext()) {
             var query = (from i in context.QuizQuestionsDB where i.ID == id && i.QuizInfoID == qiid select i).FirstOrDefault();
             context.QuizQuestionsDB.Remove(query);
             context.SaveChanges();
             if (QuizQuestionAnswerService.RemoveByQQID(id, aid, cid) && ImageLinkStorageService.RemoveByOID(id, aid))
             {
                 return(true);
             }
             return(false);
         }
     } catch { return(false); }
 }