public async Task <IActionResult> Deletegood(int goodid) { string userName = HttpContext.Session.GetString("UserName"); log.InfoFormat(userName + " || Get into 删除商品"); try { await _indexManager.DeleteGoodAsync(goodid); log.InfoFormat("删除商品成功"); ViewData["UserName"] = userName; return(RedirectToAction("Allgoodlist")); } catch (Exception e) { log.Error("删除商品失败,错误提示: " + Helper.JsonHelper.ToJson(e)); return(View("Error", e)); } }