AspireDtoAttribute
Class sealed net8.0
Marks a class as an ATS (Aspire Type System) Data Transfer Object. DTOs are serializable types used to pass structured data to capabilities.
namespace Aspire.Hosting;
public sealed class AspireDtoAttribute : System.Attribute{ // ...} Attribute
Remarks
Section titled RemarksDTOs should be simple record or class types with properties that can be serialized to/from JSON. They should not contain complex .NET types like IConfiguration, ILogger, or other framework-specific types.
Example: [AspireDto]public sealed class AddRedisOptions { public required string Name { get; init; } public int? Port { get; init; }}