private DynamoDBItem DynamoDBKey(string pk, string sk) { var dbItem = new DynamoDBItem(); dbItem.AddPK(pk); dbItem.AddSK(sk); return(dbItem); }
public async Task BatchDeleteItemsAsync(IEnumerable <TKey> items) { var dbItems = new List <DynamoDBItem>(); foreach (var item in items) { var dbItem = new DynamoDBItem(); dbItem.AddPK(PKValue(item)); dbItem.AddSK(SKValue(item)); dbItems.Add(dbItem); } await _dynamoDbClient.BatchDeleteItemsAsync(dbItems); }
public async Task BatchDeleteItemsAsync(TKey parentKey, IEnumerable <TKey> items) { var pk = PKValue(parentKey); var dbItems = new List <DynamoDBItem>(); foreach (var item in items) { var relationKey = GetRelationKey(parentKey, item); var dbItem = new DynamoDBItem(); dbItem.AddPK(pk); dbItem.AddSK(SKValue(relationKey)); dbItems.Add(dbItem); } await _dynamoDbClient.BatchDeleteItemsAsync(dbItems); }