public async Task <IActionResult> Delete(int id) { try { await _urlService.DeleteUrl(id); return(Ok()); } catch (Exception ex) { _logger.LogError(ex, "Error in Delete", new Object[] { id }); throw; } }
public IActionResult delUrl(int?Id) { if (Id == 0 || Id == null) { return(Ok(false)); } else { var isOk = _urlService.DeleteUrl((int)Id); if (isOk == true) { return(Ok(true)); } else { return(Ok(false)); } } }