public async Task <CoachAttendanceResponse> AddCoachAttendance(IEnumerable <CoachAttendance> coachAttendances) { try { await _lectureRepository.AddCoachAttendance(coachAttendances); await _unitOfWork.CompleteAsync(); return(new CoachAttendanceResponse(coachAttendances)); } catch (Exception ex) { return(new CoachAttendanceResponse($"An error occurred when saving the coach attendances: {ex.Message}")); } }