public async Task <SampleTableEntry> SaveAsync(SampleTableEntry sampleTableEntry) { var context = new Amazon.DynamoDBv2.DataModel.DynamoDBContext(_dynamoDbClient); await context.SaveAsync(new SampleTable { PartitionKey = sampleTableEntry.PartitionKey, SortKey = sampleTableEntry.SortKey }); return(sampleTableEntry); }
public async Task <T> SetAsync <T>(T item) { try { await context.SaveAsync <T>(item); return(item); } catch (Exception ex) { throw new Exception($"Amazon error in Write operation! Error: {ex}"); } }