# AspireDtoAttribute Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [AspireDtoAttribute](/reference/api/csharp/aspire.hosting/aspiredtoattribute.md)
- Kind: `Properties`
- Members: `1`

Marks a class as an ATS (Aspire Type System) Data Transfer Object. DTOs are serializable types used to pass structured data to capabilities.

## DtoTypeId

- Name: `DtoTypeId`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Ats/AspireDtoAttribute.cs)

Gets or sets an optional type identifier for this DTO. If not specified, the DTO will be serialized as a plain JSON object.

```csharp
public string? DtoTypeId { get; set; }
```

## Remarks

When set, the serialized JSON will include a `$type` field with this value.
