public ActionResult <PlatformReadDto> GetPlatformById(int id)
        {
            var platformItem = _repository.GetPlatformById(id);

            if (platformItem != null)
            {
                return(Ok(_mapper.Map <PlatformReadDto>(platformItem)));
            }
            return(NotFound());
        }
Exemple #2
0
        public ActionResult <PlatformReadDto> GetPlatformById(int id)
        {
            var platform = _repo.GetPlatformById(id);

            if (platform is not null)
            {
                var platformReadDto = _mapper.Map <PlatformReadDto>(platform);
                return(Ok(platformReadDto));
            }

            return(NotFound());
        }