Beispiel #1
0
        public async Task <ActionResult <BrandViewModel> > GetAsync(int id)
        {
            _logger.LogDebug("Get {0}", id);

            var brand = await _repository.GetBrandAsync(id);

            if (brand == null)
            {
                return(NotFound());
            }

            return(Ok(_mapper.Map <BrandViewModel>(brand)));
        }