示例#1
0
        public async Task UpdateBet(Bet bet)
        {
            var bets = await GetJArrayAsync();

            bets.Select(b =>
            {
                if (ByToken(BetEntityProperties.Name, bet.Name)(b))
                {
                    b.Replace(JToken.FromObject(bet));
                }
                return(b);
            }).ToList();
        }
示例#2
0
 public static ClientSessionEntity CreateByToken(string clientId, string token, string clientInfo)
 {
     return(new ClientSessionEntity
     {
         PartitionKey = ByToken.GeneratePartitionKey(),
         RowKey = ByToken.GenerateRowKey(token),
         ClientId = clientId,
         Registered = DateTime.UtcNow,
         LastAction = DateTime.UtcNow,
         ClientInfo = clientInfo
     });
 }