Esempio n. 1
0
        public async Task UpdateStudent(string courseName, Student student)
        {
            using (_logger.BeginScope("{CourseName}, {StudentId}", courseName, student.Id))
            {
                ThrowBadRequestIfStudentInvalid(student);

                var stopWatch = Stopwatch.StartNew();
                await _studentStore.UpdateStudent(courseName, student);

                _telemetryClient.TrackMetric("StudentStore.UpdateStudents.Time", stopWatch.ElapsedMilliseconds);
                _telemetryClient.TrackEvent("StudentUpdated");
            }
        }