public IActionResult GetAll()
        {
            var magazines = _magazineService.GetAll();

            //var consoleDtos = _mapper.Map<IList<ConsoleDto>>(consoles);
            return(Ok(magazines));
        }
 public IActionResult GetAll()
 {
     try
     {
         var result = _magazineService.GetAll();
         return(Ok(result));
     }
     catch (BusinessLogicException exception)
     {
         return(BadRequest(exception.Message));
     }
     catch (Exception exception)
     {
         _logger.LogInformation(exception.Message);
         return(StatusCode((int)HttpStatusCode.InternalServerError));
     }
 }
Beispiel #3
0
        public async Task <IActionResult> GetAll()
        {
            GetAllMagazineView getMagazine = await _magazineService.GetAll();

            return(Ok(getMagazine));
        }