示例#1
0
        public async Task <IActionResult> Index(bool?type)
        {
            var currentUser = await _userManager.GetUserAsync(User);

            if (currentUser == null)
            {
                return(Challenge());
            }

            var tasks = await _taskService.GetItemAsync(type, currentUser);

            var model = new TaskViewModel();

            {
                model.TaskItems = tasks;
            }
            return(View(model));
        }