Example #1
0
 public async Task <DateTime?> GetLastEventMomentAsync(string assetId)
 {
     return((await _storage.GetDataAsync(
                 LastCashoutEventMomentEntity.GetPartitionKey(assetId),
                 LastCashoutEventMomentEntity.GetRowKey(assetId)))
            ?.Moment);
 }
Example #2
0
 public Task <bool> SetLastCashoutEventMomentAsync(string assetId, DateTime eventMoment)
 {
     return(_storage.InsertOrReplaceAsync(new LastCashoutEventMomentEntity
     {
         AssetId = assetId,
         Moment = eventMoment,
         PartitionKey = LastCashoutEventMomentEntity.GetPartitionKey(assetId),
         RowKey = LastCashoutEventMomentEntity.GetRowKey(assetId)
     }, p => p.Moment <= eventMoment));
 }