Ejemplo n.º 1
0
        public async Task <ActionResult> LastFiveAsync()
        {
            try
            {
                var result = await _studentsRepository.GetLastFive();

                if (result.Item1)
                {
                    return(View(result.Item2));
                }
                else
                {
                    TempData["SuccessResultF"] = false;
                    TempData["SuccessResultM"] = "You are not logged in!";
                    return(RedirectToAction("Login", "Home"));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }