示例#1
0
        public async Task <IActionResult> Get([FromRoute] Guid adId)
        {
            var ad = await _adService.GetAdByIdAsync(adId);

            if (ad == null)
            {
                return(NotFound("Such ad does not exists."));
            }
            return(Ok(_mapper.Map <AdDetailsModel>(ad)));
        }