use of com.bigcrowd.noticeBoard.dto.AssignmentInfoDTO in project Notice-Board by FulvioFPimentel.
the class AssignmentService method updateAssignment.
@Transactional
public AssignmentInfoDTO updateAssignment(Long id, AssignmentInfoDTO dto) {
Assignment assignment = assignmentRepository.getById(id);
dtoToEntity(assignment, dto);
assignment = assignmentRepository.saveAndFlush(assignment);
return new AssignmentInfoDTO(assignment);
}
use of com.bigcrowd.noticeBoard.dto.AssignmentInfoDTO in project Notice-Board by FulvioFPimentel.
the class AssignmentService method save.
@Transactional
public AssignmentInfoDTO save(AssignmentInfoDTO dto) {
Assignment assignment = new Assignment();
dtoToEntity(assignment, dto);
assignment = assignmentRepository.saveAndFlush(assignment);
return new AssignmentInfoDTO(assignment);
}
Aggregations