Exemplo n.º 1
0
 public ActionResult Index()
 {
     ViewBag.Name = User.Identity.Name;
     if (User.IsInRole("STUDENT"))
     {
         ViewBag.StudentId = userRepository.GetUserIdForIdentity(UserHelpers.GetCurUserID(User));
         ViewBag.Average   = reportsRepository.GetUserLastReport(userRepository.GetUserIdForIdentity(UserHelpers.GetCurUserID(User))).averageMark;
     }
     return(View());
 }