public async Task <IActionResult> ChangeUserId(LinkedAccountsViewModel model) { if (ModelState.IsValid) { this.HttpContext.Session.SetString("ChangedUserId", model.UserId); } return(RedirectToAction("LinkedAccounts")); }
#pragma warning disable CS1998 // This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. public async Task <IActionResult> ChangeUserId(LinkedAccountsViewModel model) #pragma warning restore CS1998 // This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread. { if (ModelState.IsValid) { this.HttpContext.Session.SetString("ChangedUserId", model.UserId); } return(RedirectToAction("LinkedAccounts")); }