예제 #1
0
        public async Task <IActionResult> GetAd(int adId)
        {
            var q = new GetAd {
                AdId = adId
            };

            return(Ok(await _mediator.Send(q)));
        }
예제 #2
0
        public async Task <ActionResult <AdDetailsDto> > Get([FromRoute] GetAd query)
        {
            var result = await _dispatcher.QueryAsync(query);

            if (result is null)
            {
                return(NotFound());
            }

            return(Ok(result));
        }