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

            //var consoleDtos = _mapper.Map<IList<ConsoleDto>>(consoles);
            return(Ok(magazines));
        }
示例#2
0
 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));
     }
 }
示例#3
0
        public async Task <IActionResult> GetAll()
        {
            GetAllMagazineView getMagazine = await _magazineService.GetAll();

            return(Ok(getMagazine));
        }