Beispiel #1
0
        private List <RealStudent> UsersToRealUsers(List <User> allUsers, StudentTeacherProxy studentTeacherProxy)
        {
            List <RealStudent> allRealStudents = new List <RealStudent>();

            foreach (User student in allUsers)
            {
                allRealStudents.Add(studentTeacherProxy.GetStudent(student.Id));
            }
            return(allRealStudents);
        }
Beispiel #2
0
        public ActionResult Get(int id) //This method does NOT differentiate between any role
        {
            var result = studentTeacherProxy.GetStudent(id);

            if (result == null)
            {
                EditStudentController.currentStudent = null;
                EditStudentController.Editing        = false;
                return(NotFound());
            }
            StudentTeacherProxy.UpdateStudent(result);
            EditStudentController.currentStudent = result;
            EditStudentController.Editing        = true;
            return(Ok(result));
        }