Example #1
0
        public override void Remove(Student removeObj)
        {
            var context = new EStudentGradeBookDBContext();

            context.Students.Remove(removeObj);
            context.SaveChanges();
        }
Example #2
0
        public override void Add(Student addObj)
        {
            var context = new EStudentGradeBookDBContext();

            context.Students.Add(addObj);
            context.SaveChanges();
        }
Example #3
0
        public override void Update(Student updateObj)
        {
            var context = new EStudentGradeBookDBContext();
            var student = context.Students.FirstOrDefault(s => s.student_id == updateObj.student_id);

            student = updateObj;
            context.SaveChanges();
        }
Example #4
0
        public override List <Student> GetList()
        {
            var context = new EStudentGradeBookDBContext();

            return(context.Students.ToList());
        }