Exemplo n.º 1
0
        //public void InsertStudent(Student student)
        //{
        //    context.States.Add(student);
        //}

        //public void DeleteStudent(int studentID)
        //{
        //    Student student = context.States.Find(studentID);
        //    context.States.Remove(student);
        //}

        //public void UpdateStudent(State student)
        //{
        //    context.Entry(student).State = States.Modified;
        //}

        public void Save()
        {
            context.SaveChanges();
        }
Exemplo n.º 2
0
        //public void UpdateStudent(State student)
        //{
        //    context.Entry(student).State = States.Modified;
        //}

        public int Save()
        {
            return(context.SaveChanges());
        }