Пример #1
0
 public async Task <ActionResult <IEnumerable <Supplier> > > Get(int?id)
 {
     try
     {
         return(Ok(await _getService.GetAsync(id)));
     }
     catch (EntityNotFoundException notFoundException)
     {
         return(NotFound(notFoundException.Message));
     }
     catch (Exception exception)
     {
         _exceptionLogger.LogException(exception, nameof(SuppliersController), _logger);
         throw;
     }
 }