예제 #1
0
 public IActionResult Delete(Guid id)
 {
     try
     {
         if (id != Guid.Empty)
         {
             bool result = _navigation.DeletePage(id);
             if (result)
             {
                 return(Ok(result));
             }
         }
         return(BadRequest("Invalid page"));
     }
     catch (Exception ex)
     {
         string errorMessage = string.Format("Error occured while deleting page, PageId: ", id);
         _logger.LogError(errorMessage, ex);
         return(new StatusCodeResult(StatusCodes.Status500InternalServerError));
     }
 }