public async Task <IActionResult> Index() { var user = await _userManager.GetUserAsync(User); List <UserTask> userTaskList = new List <UserTask>(); IEnumerable <UserTask> userTaskListResultSet; if (user == null) { throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); } _webAPI.AssignAuth(user.UserName); var result = await _webAPI.GetRequest(); var deserializeResult = JsonConvert.DeserializeObject <UserTask[]>(result.ToString()); foreach (var userTask in deserializeResult) { userTaskList.Add(userTask); } userTaskListResultSet = userTaskList.Where(ut => ut.UserID == user.Id); return(View(userTaskListResultSet)); }