public T PutItem <T>(T value, bool returnOld = false) { var table = DynamoMetadata.GetTable <T>(); var request = new PutItemRequest { TableName = table.Name, Item = Converters.ToAttributeValues(this, value, table), ReturnValues = returnOld ? ReturnValue.ALL_OLD : ReturnValue.NONE, }; var response = Exec(() => DynamoDb.PutItem(request)); if (response.Attributes.IsEmpty()) { return(default);
public T Add(T Element) { DynamoDb.PutItem(Element); return(Element); }