Exemplo n.º 1
0
 public static bool Insert(Guid id, string desc, float points, bool ic, Guid qqid)
 {
     try {
         var data = QuizQuestionAnswerVM.set(id, desc, points, ic, qqid);
         using (var context = new CentralProcessContext()) {
             context.QuizQuestionAnswerDB.Add(data);
             context.SaveChanges();
             return(true);
         }
     } catch { return(false); }
 }
Exemplo n.º 2
0
 public static bool Insert(Guid id, string description, bool isCorrect, Guid qqid)
 {
     try {
         using (var context = new GeopersonContext()) {
             var data = QuizQuestionAnswerVM.set(id, description, isCorrect, qqid);
             context.QuizQuestionAnswerDB.Add(data);
             context.SaveChanges();
             return(true);
         }
     } catch { return(false); }
 }