Exemplo n.º 1
0
 public DecodedGameData Map(EncodedGameData encodedGameData)
 {
     return(new DecodedGameData
     {
         Id = encodedGameData.Id,
         ReceivingDate = encodedGameData.ReceivingDate,
         SessionId = encodedGameData.SessionId,
         CardNumber = encodedGameData.CardNumber,
         PlayerId = encodedGameData.PlayerId,
         FirstName = _cryptoServiceProvider.Decrypt(encodedGameData.FirstName),
         LastName = _cryptoServiceProvider.Decrypt(encodedGameData.LastName),
         MiddleName = _cryptoServiceProvider.Decrypt(encodedGameData.MiddleName),
         IdenCardId = encodedGameData.IdenCardId,
         MachId = encodedGameData.MachId,
         UpdateDate = encodedGameData.UpdateDate,
         EarnedPoints = encodedGameData.EarnedPoints
     });
 }
Exemplo n.º 2
0
 public async Task Add(EncodedGameData gameData)
 {
     var collection = GetCollection <EncodedGameData>(Collections.EncodedGameData);
     await collection.InsertOneAsync(gameData);
 }