Exemplo n.º 1
0
 public bool Update(Courses originalCourse, Courses updatedCourse)
 {
     _ctx.Entry(originalCourse).CurrentValues.SetValues(updatedCourse);
     originalCourse.CourseSubject = updatedCourse.CourseSubject;
     originalCourse.CourseTutor   = updatedCourse.CourseTutor;
     return(true);
 }
        public bool Update(Course originalCourse, Course updatedCourse)
        {
            _ctx.Entry(originalCourse).CurrentValues.SetValues(updatedCourse);
            //To update child entites in Course entity
            originalCourse.CourseSubject = updatedCourse.CourseSubject;
            originalCourse.CourseTutor   = updatedCourse.CourseTutor;

            return(true);
        }
Exemplo n.º 3
0
 public bool Update(Student originalStudent, Student updatedStudent)
 {
     _ctx.Entry(originalStudent).CurrentValues.SetValues(updatedStudent);
     return(true);
 }