public DoctorGrade GiveGradeToDoctor(Doctor doctor, Dictionary <string, double> gradesForDoctor) { DoctorGrade doctorGrade = doctor.DoctorGrade; doctorGrade.NumberOfGrades++; foreach (String question in doctorGrade.GradesForEachQuestions.Keys.ToList()) { doctorGrade.GradesForEachQuestions[question] = (doctorGrade.GradesForEachQuestions[question] * (doctorGrade.NumberOfGrades - 1) + gradesForDoctor[question]) / doctorGrade.NumberOfGrades; } _doctorGradeService.Edit(doctorGrade); return(doctorGrade); }
public void Edit(DoctorGrade entity) { _doctorGradeService.Edit(entity); }