public void Write(string key, string value) { var rowId = new TableRowId(_partitionKey, key); if (value == null) { _tableStorage.Delete(_tableName, rowId); } else { var row = new TableRow(rowId); row["value"] = value; _tableStorage.InsertOrReplace(_tableName, row); } }
private void Init(TableRowId rowId, bool useConcurencyKey) { if (rowId == null) { throw new ArgumentNullException("rowId"); } PartitionKey = ToInternalId(rowId.PartitionKey); RowKey = ToInternalId(rowId.RowKey); if (useConcurencyKey && rowId.ConcurrencyKey != null) { ETag = rowId.ConcurrencyKey; } else { ETag = "*"; } Timestamp = rowId.LastModified; }
private void SetValue(JET_TABLEID tableId, IDictionary <string, JET_COLUMNID> columns, TableRowId rowId) { Api.SetColumn(_jetSession, tableId, columns[PartitionKeyName], rowId.PartitionKey, Encoding.Unicode); Api.SetColumn(_jetSession, tableId, columns[RowKeyName], rowId.RowKey, Encoding.Unicode); }
public EntityAdapter(TableRowId rowId) { Init(rowId, true); }