Esempio n. 1
0
 public static bool Insert(Guid id, Guid qtid, Guid qqid, Guid qaid, string oa, float pe)
 {
     try {
         var data = QuizUserAnswerVM.set(id, qtid, qqid, qaid, oa, pe);
         using (var context = new CentralProcessContext()) {
             context.QuizUserAnswerDB.Add(data);
             context.SaveChanges();
             return(true);
         }
     } catch { return(false); }
 }
 public static bool Insert(Guid id, Guid qtid, Guid qqid, Guid qaid, string otherAnswer, int points)
 {
     try {
         using (var context = new GeopersonContext()) {
             var data = QuizUserAnswerVM.set(id, qtid, qqid, qaid, otherAnswer, points);
             context.QuizUserAnswerDB.Add(data);
             context.SaveChanges();
             return(true);
         }
     } catch { return(false); }
 }