AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Indicates that the properties of the decorated field or property type should be "flattened" into the parent object's attribute structure in DynamoDB. When applied, all public properties of the referenced type are serialized as individual top-level attributes of the parent item, rather than as a nested object or map.

Example:

public class Address
{
    public string Street { get; set; }
    public string City { get; set; }
}
            
public class Person
{
    public string Name { get; set; }
    [DynamoDBFlatten]
    public Address Address { get; set; }
}
             
In this example, the Person table will have top-level attributes for Name, Street, and City.

Inheritance Hierarchy

System.Object
  System.Attribute
    Amazon.DynamoDBv2.DataModel.DynamoDBAttribute
      Amazon.DynamoDBv2.DataModel.DynamoDBFlattenAttribute

Namespace: Amazon.DynamoDBv2.DataModel
Assembly: AWSSDK.DynamoDBv2.dll
Version: 3.x.y.z

Syntax

C#
public sealed class DynamoDBFlattenAttribute : DynamoDBAttribute

The DynamoDBFlattenAttribute type exposes the following members

Constructors

NameDescription
Public Method DynamoDBFlattenAttribute()

Properties

NameTypeDescription
Public Property TypeId System.Object Inherited from System.Attribute.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer