Beispiel #1
0
        public async Task <IActionResult> LoadScores(string error = "")
        {
            var id = HttpContext.User.Claims
                     .FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier).Value;
            var idGuid = Guid.Parse(id);

            var result = await _repo.LoadCurrentCourses(idGuid);

            if (result.IsSuccess)
            {
                ViewBag.Courses = result.Content;
                ViewData["For"] = "scores";
                return(View("SelectDate"));
            }

            ViewBag.Error = error;
            return(View("Oops"));
        }