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); }