public int AddAnswer(int QID, string Answer, string cstring)
        {
            int cint;
            if (cstring != "false")
            {
                cint = 1;
            }
            else
            {
                cint = 0;
            }

            var newAnswer = new Answer { QuestionID = QID, AnswerText = Answer, Correctness = cint };
            context.Answers.Add(newAnswer);
            var result = context.SaveChanges();
            return result;
        }
 public void EditAnswer(Answer answer)
 {
     context.Entry(answer).State = System.Data.EntityState.Modified;
     context.SaveChanges();
 }
 public void DeleteAnswer(Answer answer)
 {
     context.Answers.Remove(answer);
 }