private IEnumerable <Model.Participant> ConvertDtoToModel(IEnumerable <Participant> newParticipants)
        {
            var currentParticipants = _participantService.LoadAllAvailableParticipants().ToList();

            foreach (var participant in newParticipants)
            {
                yield return(ConvertDtoToModelSingle(currentParticipants, participant));
            }
        }
Пример #2
0
        private void Participants(string[] input)
        {
            if (input.Length < 2)
            {
                logger.Info("Invalid input, redirect to Races Menu");
                Participants();
                return;
            }

            if (input[0] == "l")
            {
                _participantService.LoadAllAvailableParticipants();
                return;
            }

            if (input[0] == "c")
            {
                TryCreateNewParticipant(input.Skip(1).ToArray());
            }
        }
Пример #3
0
        public IEnumerable <Participant> GetAllAvailableParticipants()
        {
            var allAvailableParticipants = _participantService.LoadAllAvailableParticipants();

            return(ParticipantConverter.ConvertModelToDto(allAvailableParticipants));
        }