public async Task <IActionResult> Delete(string id) { if (id == null) { return(NotFound()); } var user = await _userManager.GetUserAsync(User); if (user == null) { throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); } _webAPI.AssignAuth(user.UserName); await _webAPI.DeleteRequest(id); return(RedirectToAction(nameof(Index))); }