SHARE
TWEET

Untitled

a guest Aug 17th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DynamoDBContextConfig config = new DynamoDBContextConfig()
  2. {
  3.     ConsistentRead = false,
  4.     Conversion =  DynamoDBEntryConversion.V2
  5. };
  6.  
  7. using (DynamoDBContext context = new DynamoDBContext(config))
  8. {
  9.     long unixTimestamp = (long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
  10.     QTrackStatus qTrackStatus = new QTrackStatus()
  11.     {
  12.         Key = "m@m.com",
  13.         EventCode = "CC",
  14.         EventDateTime = "2019-09-09 14:00:30",
  15.         EventLocation = "BFS",
  16.         EventLastUpdate = unixTimestamp
  17.     };
  18.  
  19.     DynamoDBOperationConfig dynamoDBOperationConfig = new DynamoDBOperationConfig()
  20.     {
  21.         QueryFilter = new List<ScanCondition>()
  22.         {
  23.             { new ScanCondition("EventCode", ScanOperator.NotEqual, "CC") }
  24.         },
  25.         ConditionalOperator = ConditionalOperatorValues.And
  26.     };
  27.  
  28.     await context.SaveAsync(qTrackStatus, dynamoDBOperationConfig);
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top