Exemple #1
0
        private LinkCollectionWrapperDto <SelectionDto> CreateSelectionsWrapper(IEnumerable <SelectionDto> selectionDtos,
                                                                                ResultExecutingContext context)
        {
            var wrapper = new LinkCollectionWrapperDto <SelectionDto>(selectionDtos.ToList());

            wrapper.Links = CreateLinksForSelections(context, selectionDtos.FirstOrDefault()?.MarketId).ToList();
            return(wrapper);
        }
Exemple #2
0
        private LinkCollectionWrapperDto <EventTypeDto> CreateEventTypesWrapper(IEnumerable <EventTypeDto> eventTypeDtos,
                                                                                ResultExecutingContext context)
        {
            foreach (var dto in eventTypeDtos)
            {
                AddLinksToEventType(dto, context);
            }
            var wrapper = new LinkCollectionWrapperDto <EventTypeDto>(eventTypeDtos.ToList());

            wrapper.Links = CreateLinksForEventTypes(context).ToList();
            return(wrapper);
        }
Exemple #3
0
        private LinkCollectionWrapperDto <MarketDto> CreateMarketsWrapper(IEnumerable <MarketDto> marketDtos,
                                                                          ResultExecutingContext context)
        {
            foreach (var dto in marketDtos)
            {
                AddLinksToMarket(dto, context);
            }
            var wrapper = new LinkCollectionWrapperDto <MarketDto>(marketDtos.ToList());

            wrapper.Links = CreateLinksForMarkets(context, marketDtos.FirstOrDefault()?.EventId).ToList();
            return(wrapper);
        }
        private LinkCollectionWrapperDto <CompetitionDto> CreateCompetitionsWrapper(IEnumerable <CompetitionDto> competitionDtos,
                                                                                    ResultExecutingContext context)
        {
            foreach (var dto in competitionDtos)
            {
                AddLinksToCompetition(dto, context);
            }
            var wrapper = new LinkCollectionWrapperDto <CompetitionDto>(competitionDtos.ToList());

            wrapper.Links = CreateLinksForCompetitions(context, competitionDtos.FirstOrDefault()?.EventTypeId).ToList();
            return(wrapper);
        }
Exemple #5
0
        private LinkCollectionWrapperDto <EventDto> CreateEventsWrapper(IEnumerable <EventDto> eventDtos,
                                                                        ResultExecutingContext context)
        {
            foreach (var dto in eventDtos)
            {
                AddLinksToEvent(dto, context);
            }
            var wrapper = new LinkCollectionWrapperDto <EventDto>(eventDtos.ToList());

            wrapper.Links = CreateLinksForEvents(context, eventDtos.FirstOrDefault()?.CompetitionId).ToList();
            return(wrapper);
        }