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)); }
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"); } }