Skip to content

Are GenerateSerializer and [Id] always required? #9375

Open
@keithazzopardi

Description

@keithazzopardi

I would like to pass a DTO to a service layer without dependencies on Orleans omitting attributes like [Id] or [GenerateSerializer] in the Service Layer DTO. Is there a way to apply these attribute programmatically or perhaps via inheritance as below.

/* Service DTO. No Orleans dependencies */
public class Order {
    // DTO properties
}

/* Orleans DTO */
[GenerateSerializer]
public class OrleansOrder : Order{
    
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions