Beispiel #1
0
        /// <inheritdocs />
        public async Task <Exceptional <IList <BoardGameSearch> > > SearchAsync()
        {
            try
            {
                var url      = _apiProvider.BuildUri(ApiEndPoint.Search, _whereQueries);
                var rootList = await _apiProvider
                               .CallWebServiceGetAsync <BoardGameListDto>(url)
                               .ConfigureAwait(false);

                var result = rootList?.BoardGames
                             .Select(x => _modelFactory.CreateBoardGameSearch(x))
                             .ToList();

                return(Exceptional <IList <BoardGameSearch> > .Success(result));
            }
            catch (Exception ex)
            {
                return(Exceptional <IList <BoardGameSearch> > .Failure(ex));
            }
        }