I currently have inheritance between DTO's which works well as long as I have for each concrete (leaf-node) DTO a [Route] defined, and not on one of the superclasses. Up until now the superclasses were all abstract. Now I'm in the situation where I have a DTO which is concrete and has a [Route] attribute defined is also a superclass of another DTO with it's own route.
Both DTO's have their own services, but it does not work as expected. Both DTO's are "routed" to the leaf-node.
superclass DTOA
subclass DTOB where DTOB : DTOA
when I do a GET on DTOA it is the service for DTOB that responds. Apart from modeling my inheritance different, how can I fix that the routes work as I had hoped they would?
therefore:
DTOA routed to serviceA
DTOB routed to serviceB
Is this happening because of the fact that RouteAttributes are inherited? And what is the reason for having Inherited = true on the RouteAttribute?