public async Task <IActionResult> GetItems([FromRoute] string auctionId) { var query = new GetAuctionItemsListQuery(auctionId); var viewModel = await _queryBus.ExecuteAsync <GetAuctionItemsListQuery, ListViewModel <AuctionItemListItemViewModel> >(query); return(Ok(viewModel)); }
public async Task <IActionResult> GetAll() { var query = new GetAuctionsListQuery(); var result = await _queryBus.ExecuteAsync <GetAuctionsListQuery, ListViewModel <AuctionListItemViewModel> >(query); return(Ok(result)); }