private UserSelectionDto ConvertUserSelectionToDto(UserSelection userSelection)
        {
            UserSelectionDto usDto = new UserSelectionDto()
            {
                Id     = userSelection.Id,
                TeamId = userSelection.TeamId,
                WeekId = userSelection.WeekId
            };

            return(usDto);
        }
        private UserSelection ConvertUserSelectionDtoToEntity(UserSelectionDto dto)
        {
            UserSelection us = new UserSelection()
            {
                Id     = dto.Id,
                UserId = Convert.ToInt32(User.Claims.ToList()[1].Value),
                TeamId = dto.TeamId,
                WeekId = dto.WeekId
            };

            return(us);
        }
        public async Task <UserSelectionDto> Get(int weekId)
        {
            UserSelection selection = await _getUserSelectionService.Get(weekId,
                                                                         Convert.ToInt32(User.Claims.ToList()[1].Value));

            if (selection == null)
            {
                return(null);
            }

            UserSelectionDto dto = ConvertUserSelectionToDto(selection);

            return(dto);
        }
 public async Task Upsert(UserSelectionDto selectionDto)
 {
     await _updateUserSelectionService.Upsert(ConvertUserSelectionDtoToEntity(selectionDto));
 }