Aerospike.Database.LINQPadDriver.Extensions Namespace
Aerospike LINDPad Driver

SetRecords..::..WriteObject<(Of <(<'T>)>)> Method

Writes the instance where each field/property is a bin name and the associated value the bin's value. BinNameAttribute which allows you to use this name instead of the property/field name. BinIgnoreAttribute which will ignore the property/field name (not written to the DB)

Namespace:  Aerospike.Database.LINQPadDriver.Extensions
Assembly:  Aerospike.Database.LINQPadDriver (in Aerospike.Database.LINQPadDriver.dll)

Syntax


public void WriteObject<T>(
	Object primaryKey,
	T instance,
	Func<string, string, Object, bool, Object> transform,
	string documentBinName,
	WritePolicy writePolicy,
	Nullable<TimeSpan> ttl
)

Type Parameters

T

Parameters

primaryKey
Type: Object
instance
Type: T
transform
Type: Func<(Of <(<'String, String, Object, Boolean, Object>)>)>
A action that is called to perform customized transformation. First argument -- the name of the property/field Second argument -- the name of the bin (can be different from property/field name, if BinNameAttribute is defined) Third argument -- the instance being transformed Fourth argument -- if true the instance is within another object. Returns the new transformed object or null to indicate that this bin should be skipped.
documentBinName
Type: String
If provided the record is created as a document and this will be the name of the bin.
writePolicy
Type: WritePolicy
ttl
Type: Nullable<(Of <(<'TimeSpan>)>)>