public IActionResult MemberAdd() { var _parent = _schoolServices.GetParent(HttpContext.Session.GetAuth().Key); ViewBag.parent = _parent; return(View(new MemberViewModel())); }
// GET: Parent public async Task <ActionResult> Index() { var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier); var parent = await _schoolService.GetParent(userId); ViewBag.teachers = await _schoolService.GetTeachersAsync(); return(View(parent)); }
// GET: Parent public async Task <ActionResult> Index() { if (ModelState.IsValid) { var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier); var parent = await _schoolService.GetParent(userId); return(View(parent)); } else { return(View()); } }