Table of Contents

Class DynamoDBPropertyAttribute

Namespace
Amazon.DynamoDBv2.DataModel
Assembly
AWSSDK.DynamoDBv2.dll

DynamoDB property attribute. Can be used to specify an alternative attribute name or configure a custom converter.

[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class DynamoDBPropertyAttribute : DynamoDBRenamableAttribute
Inheritance
DynamoDBPropertyAttribute
Derived
Inherited Members

Constructors

DynamoDBPropertyAttribute()

Default constructor

public DynamoDBPropertyAttribute()

DynamoDBPropertyAttribute(bool)

Constructor that specifies that this type should be stored as epoch seconds.

public DynamoDBPropertyAttribute(bool storeAsEpoch)

Parameters

storeAsEpoch bool

Whether the data should be stored as epoch seconds. If false, data is stored as ISO-8601 string.

DynamoDBPropertyAttribute(string)

Constructor that specifies an alternate attribute name

public DynamoDBPropertyAttribute(string attributeName)

Parameters

attributeName string

Name of attribute to be associated with property or field.

DynamoDBPropertyAttribute(string, bool)

Constructor that specifies an alternate attribute name and that this type should be stored as epoch seconds.

public DynamoDBPropertyAttribute(string attributeName, bool storeAsEpoch)

Parameters

attributeName string

Name of attribute to be associated with property or field.

storeAsEpoch bool

Whether the data should be stored as epoch seconds. If false, data is stored as ISO-8601 string.

DynamoDBPropertyAttribute(string, Type)

Constructor that specifies an alternate attribute name and a custom converter.

Converter must be the type of a class that implements IPropertyConverter.

public DynamoDBPropertyAttribute(string attributeName, Type converter)

Parameters

attributeName string

Name of attribute to be associated with property or field.

converter Type

Custom converter type.

DynamoDBPropertyAttribute(Type)

Constructor that specifies a custom converter.

Converter must be the type of a class that implements IPropertyConverter.

public DynamoDBPropertyAttribute(Type converter)

Parameters

converter Type

Custom converter type.

Properties

Converter

Type of the custom converter. Cannot be set at the same time as StoreAsEpoch.

public Type Converter { get; set; }

Property Value

Type

StoreAsEpoch

Flag that directs DynamoDBContext to store this data as epoch seconds integer. If false, data is stored as ISO-8601 string. Cannot be set at the same time as Converter.

public bool StoreAsEpoch { get; set; }

Property Value

bool