Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public void AddInstructor(DEV_Library.Models.Instructor instructor)
 {
     Entities.Instructor newInstructor = Mapper.MapInstructor(instructor);
     _context.Add(newInstructor);
 }