public async Task <IActionResult> GetAd(int adId) { var q = new GetAd { AdId = adId }; return(Ok(await _mediator.Send(q))); }
public async Task <ActionResult <AdDetailsDto> > Get([FromRoute] GetAd query) { var result = await _dispatcher.QueryAsync(query); if (result is null) { return(NotFound()); } return(Ok(result)); }