public PlayerEntity(Int64 playerId) { PartitionKey = StorageManager.GetPlayerTablePartitionKey(playerId); RowKey = RowKeyString; }
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); }
public PlayerGameEntity(Int64 playerId, Guid gameId) { PartitionKey = StorageManager.GetPlayerTablePartitionKey(playerId); RowKey = String.Format(RowKeyString, gameId); }