public JsonResult GetTeacherDetailsById(int teacherId) { Teacher teacher = teacherManager.GetTeacherDetailsById(teacherId); teacher.TotalTeacherCreditTaken = courseAssignManager.GetTotalCreditTaken(teacherId); return(Json(teacher)); }