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); }
public bool Update(Student originalStudent, Student updatedStudent) { _ctx.Entry(originalStudent).CurrentValues.SetValues(updatedStudent); return(true); }