public IActionResult DeleteMenu([FromRoute] Guid id) { try { var stopwatch = StopwatchLogger.Start(_log); _log.Info("Called MenuController DeleteMenu with menuId {0}=", id); if (id == Guid.Empty) { return(BadRequest("Menu id required !")); } _iMenuManager.DeleteMenu(TenantCode, id); _iMenuManager.ClearMenuCache(TenantCode); stopwatch.StopAndLog("DeleteMenu method of MenuController"); return(Ok(true)); } catch (Exception ex) { _log.Error(ExceptionFormatter.SerializeToString(ex)); return(StatusCode((int)HttpStatusCode.InternalServerError, ApiConstant.CustomErrorMessage)); } }
public async Task <string> DeleteMenu(DeleteByIdInput input) { await _menuManager.DeleteMenu(input.Id); return("删除菜单成功"); }
public IActionResult DeleteConfirmed(int id) { _menuManager.DeleteMenu(id); return(RedirectToAction(nameof(Index))); }