public static bool AddNew(HDS_Answer Ans)
 {
     try
     {
         ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities();
         exMana.AddToHDS_Answer(Ans);
         exMana.SaveChanges();
     }
     catch (Exception e)
     {
         errMsg = e.Message;
         return false;
     }
     errMsg = "";
     return true;
 }
 public static bool Update(HDS_Answer Ans)
 {
     try
     {
         ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities();
         HDS_Answer obj = exMana.HDS_Answer.First(temp => temp.Ans_ID == Ans.Ans_ID);
         obj.Que_ID = Ans.Que_ID;
         obj.Ans_Answer = Ans.Ans_Answer;
         obj.Ans_IsTrue = Ans.Ans_IsTrue;
         exMana.SaveChanges();
     }
     catch (Exception e)
     {
         errMsg = e.Message;
         return false;
     }
     errMsg = "";
     return true;
 }
 /// <summary>
 /// Create a new HDS_Answer object.
 /// </summary>
 /// <param name="ans_ID">Initial value of the Ans_ID property.</param>
 public static HDS_Answer CreateHDS_Answer(global::System.Int32 ans_ID)
 {
     HDS_Answer hDS_Answer = new HDS_Answer();
     hDS_Answer.Ans_ID = ans_ID;
     return hDS_Answer;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the HDS_Answer EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToHDS_Answer(HDS_Answer hDS_Answer)
 {
     base.AddObject("HDS_Answer", hDS_Answer);
 }