public async Task <IActionResult> GetItems(string username) { var query = new GetCatalogItems(username); var result = await mediator.Send(query); return(View(result)); }
public IActionResult About() { //get all catalog items, to know what to order GetCatalogItems jsonToBe = new GetCatalogItems { Action = Action.GetAll }; _eventBus.Publish(jsonToBe, "Catalog"); return(View()); }
public async Task <IEnumerable <CatalogItemDto> > Handle(GetCatalogItems request, CancellationToken cancellationToken) { var query = await repo.ReadAll(); return(mapper.Map <IEnumerable <CatalogItemDto> >(query)); }