using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace EHEC_Server
{
    public partial class Origin_Exam
    {
        public Origin_Exam CreateOrigin_Exam(Origin_Exam origin_exam)
        {
            try
            {
                using (EHEC_DBEntities ctx = new EHEC_DBEntities())
                {
                    ctx.Origin_Exam.Add(origin_exam);
                    ctx.SaveChanges();
                }
                return origin_exam;
            }
            catch (Exception)
            {
                return new Origin_Exam();
            }
        }
        public List<Origin_Exam> GetAllOrigin_Exams()
        {
            using (EHEC_DBEntities ctx = new EHEC_DBEntities())
            {
                return ctx.Origin_Exam.ToList();
            }
        }
    }
}