public StudentLecturerEntity Update(UserEntity userEntity, Guid StudentId, StudentLecturerEntity studentLectureEntity)
        {
            StudentLecturer studentLecturer = IMSContext.StudentLecturers.Where(sl => sl.StudentId == StudentId).FirstOrDefault();

            studentLectureEntity.ToModel(studentLecturer);
            IMSContext.SaveChanges();
            return(null);
        }
        public StudentLecturerEntity Create(UserEntity userEntity, StudentLecturerEntity studentLecturerEntity)
        {
            StudentLecturer studentLecturer = studentLecturerEntity.ToModel();

            IMSContext.StudentLecturers.Add(studentLecturer);
            IMSContext.SaveChanges();
            return(studentLecturerEntity);
        }
示例#3
0
 public StudentLecturerEntity Update(Guid StudentId, [FromBody] StudentLecturerEntity studentLecturerEntity)
 {
     return(StudentLecturerService.Update(UserEntity, StudentId, studentLecturerEntity));
 }
示例#4
0
 public StudentLecturerEntity Create([FromBody] StudentLecturerEntity studentLectureEntity)
 {
     return(StudentLecturerService.Create(UserEntity, studentLectureEntity));
 }