public void UpdateInstructor(DEV_Library.Models.Instructor instructor)
        {
            Entities.Instructor currentInstructor = _context.Instructor.Find(instructor.Id);
            Entities.Instructor updatedInstructor = Mapper.MapInstructor(instructor);

            _context.Entry(currentInstructor).CurrentValues.SetValues(updatedInstructor);
        }
Exemplo n.º 2
0
        public void UpdateTask(DEV_Library.Models.Task task)
        {
            Entities.Task currentTask = _context.Task.Find(task.Id);
            Entities.Task updatedTask = Mapper.MapTask(task);

            _context.Entry(currentTask).CurrentValues.SetValues(updatedTask);
        }
Exemplo n.º 3
0
        public void UpdateCourse(Course course)
        {
            Entities.Course currentCourse = _context.Course.Find(course.Id);
            Entities.Course updatedCourse = Mapper.MapCourse(course);

            _context.Entry(currentCourse).CurrentValues.SetValues(updatedCourse);
        }
Exemplo n.º 4
0
        public void UpdateStudent(DEV_Library.Models.Student student)
        {
            Entities.Student currentStudent = _context.Student.Find(student.Id);
            Entities.Student updatedStudent = Mapper.MapStudent(student);

            _context.Entry(currentStudent).CurrentValues.SetValues(updatedStudent);
        }