Пример #1
0
 public PlayerEntity(Int64 playerId)
 {
     PartitionKey = StorageManager.GetPlayerTablePartitionKey(playerId);
     RowKey       = RowKeyString;
 }
Пример #2
0
        public static PlayerEntity GetPlayerEntity(Int64 playerId)
        {
            var playerQuery = new TableQuery <PlayerEntity>().Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, StorageManager.GetPlayerTablePartitionKey(playerId)));

            IEnumerable <PlayerEntity> results = StorageManager.Instance.PlayersTable.ExecuteQuery(playerQuery);
            PlayerEntity entity = results.FirstOrDefault();

            if (null == entity)
            {
                entity = new PlayerEntity(playerId);
            }

            return(entity);
        }
Пример #3
0
 public PlayerGameEntity(Int64 playerId, Guid gameId)
 {
     PartitionKey = StorageManager.GetPlayerTablePartitionKey(playerId);
     RowKey       = String.Format(RowKeyString, gameId);
 }