Пример #1
0
 public IActionResult Delete(long id)
 {
     try
     {
         var result = _magazineService.Delete(id);
         return(Ok(result));
     }
     catch (BusinessLogicException exception)
     {
         return(BadRequest(exception.Message));
     }
     catch (Exception exception)
     {
         _logger.LogInformation(exception.Message);
         return(StatusCode((int)HttpStatusCode.InternalServerError));
     }
 }
Пример #2
0
 public IActionResult Delete(int id)
 {
     _magazineService.Delete(id);
     return(Ok());
 }
Пример #3
0
        public async Task <IActionResult> Delete(int id)
        {
            await _magazineService.Delete(id);

            return(Ok());
        }