Ejemplo n.º 1
0
        public async Task <ActionResult <Models.Banner> > GetBannerAsync(int id)
        {
            var banner = await bannerService.GetBannerAsync(id);

            if (banner == null)
            {
                return(NotFound(ErrorMessage.InvalidData(Constant.NotFound, typeof(Models.Banner), Constant.Id, id.ToString())));
            }
            return(Ok(mapper.Map <Models.Banner>(banner)));
        }