public async Task <AssignmentResponse> GetByIdAsync(int id) { var existingAssignment = await _assignmentRepository.FindByIdAsync(id); if (existingAssignment == null) { return(new AssignmentResponse("Employee not found.")); } return(new AssignmentResponse(existingAssignment)); }