Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
 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));
         }
     }
 }