/// <summary> /// 删除 /// </summary> protected void DeleteLink() { // LinkInfo link = LinkManager.GetLink(linkId); //if (link != null && link.Type == (int)LinkType.System) //{ // Response.Redirect("linklist.aspx?result=4"); //} LinkManager.DeleteLink(linkId); Response.Redirect("linklist.aspx?result=3"); }
public async Task <ActionResult> Delete(string key) { try { if (await _linkManager.DeleteLink(key)) { return(Ok()); } } catch (Exception ex) { _logger.LogError($"Failed to delete a Link {ex}"); } return(BadRequest("Failed to delete a Link")); }