// GET: Teacher/Edit/5 public async Task <ActionResult> EditStudentProfile(int id) { var studentFromDb = await _schoolService.GetStudent(id); var profileFromDb = studentFromDb.Profile; return(View(profileFromDb)); }
// GET: Student public async Task <ActionResult> Index() { var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier); var student = await _schoolService.GetStudent(userId); ViewBag.teachers = await _schoolService.GetTeachersAsync(); return(View(student)); }
// GET: Student public async Task <ActionResult> Index() { if (ModelState.IsValid) { var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier); var student = await _schoolService.GetStudent(userId); return(View(student)); } else { return(View()); } }
// GET: Teacher/Details/5 public async Task <ActionResult> Details(int id) { var student = await _schoolService.GetStudent(id); return(View(student)); }