예제 #1
0
        public async Task AddDealer(InnerGameModel gameData, int id)
        {
            var dealerDto = new UserDTO()
            {
                GameId = id
            };
            var modelViewToDto = new ModelViewToDTO();
            var dtoToEntities  = new DTOToEntities();

            dealerDto = modelViewToDto.GetDealerDto(gameData, dealerDto);
            await _userRepository.CreateAsync(dtoToEntities.GetDealer(dealerDto));
        }
예제 #2
0
 public async Task AddDealer(InnerGameViewModel gameData, int id)
 {
     try
     {
         var dealerDto = new UserDTO();
         dealerDto.GameId = id;
         dealerDto        = _modelViewToDto.GetDealerDto(gameData, dealerDto);
         await _userRepository.CreateAsync(_dtoToEntities.GetDealer(dealerDto));
     }
     catch (Exception e)
     {
         LogWriter.WriteLog(e.Message, "CreateGameService");
     }
 }