Пример #1
0
        public async Task <IEnumerable <CommanderDto> > GetCommanders()
        {
            var commanders = await _commanderRepository.Get();

            var commanderDtos = commanders.Select(CommanderMapper.CommanderMap);
            int id            = 1;

            foreach (var commander in commanderDtos)
            {
                commander.Id = id;
                id++;
            }

            return(commanderDtos);
        }