Exemplo n.º 1
0
 public async Task SetAsync(string key, object entry, DateTime utcExpiry)
 {
     //Check if the key is already in database
     //If there is already a value in the cache for the specified key, the Set method will update it.
     //Otherwise it will insert the entry.
     var insertOp = TableOperationHelper.InsertOrReplace(key, entry, utcExpiry);
     await _table.ExecuteAsync(insertOp);
 }
Exemplo n.º 2
0
        public void Set(string key, object entry, DateTime utcExpiry)
        {
            var insertOp = TableOperationHelper.InsertOrReplace(key, entry, utcExpiry);

            _table.Execute(insertOp);
        }