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