/// <summary> /// /// </summary> public async Task <CardListViewModel> GetListByBoardIdAsync(string boardId) { var cardsQuery = new GetCardsByBoardIdQuery(boardId: boardId); var cards = await SendQueryAsync <GetCardsByBoardIdQuery, IEnumerable <CardOutput> >(cardsQuery); var boardQuery = new GetBoardByIdQuery(id: boardId); var board = await SendQueryAsync <GetBoardByIdQuery, BoardOutput>(boardQuery); return(new CardListViewModel { Board = board, Cards = cards, }); }
public async Task <IEnumerable <CardOutput> > Handle(GetCardsByBoardIdQuery request, CancellationToken cancellationToken) { var projects = await _projectRepository.GetListByBoardIdAsync(request.BoardId); return(_mapper.Map <IEnumerable <CardOutput> >(projects)); }