public IActionResult Index() { var TeacherClasses = _tPClassRepository.GetTeacherClassSubjectstDistinctByTeacherId(HttpContext.Session.GetInt32("UserId")??1); if (TempData["Error"] != null) { ViewBag.Error = TempData["Error"].ToString(); } if (TempData["Success"] != null) { ViewBag.Success = TempData["Success"].ToString(); } return View(TeacherClasses); }
public async Task <IViewComponentResult> InvokeAsync() { var TeacherClasses = _tPClassRepository.GetTeacherClassSubjectstDistinctByTeacherId(HttpContext.Session.GetInt32("UserId") ?? 0); return(View("TPSidebarVC", TeacherClasses)); }