Beispiel #1
0
        public ActionResult Index()
        {
            var currentUser = userTask.UserAuthorizationCheck(User.Identity.Name);

            if (currentUser != null)
            {
                ViewBag.Message = userTask.GetTasksCountForUser(currentUser.Id);

                var todoListToReturn = userTask.GetTasksListForUser(currentUser.Id);

                return(View(todoListToReturn));
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }