I have a question about how iI should use services in ServiceStack from other services.
I have DTO answers for all my requests, witch implements the IReturn interface. With a client like JsonServiceClient , when I make requests, it returns an object response with a type implemented in IReturn , great!
Now, when I rephrase the project writing plugins for services that will be used in future projects, when I add the service to another service and make a request, it returns the type of the object, so I have to give it HttpResult , then draw the response of the object to the DTO type.
In most of my service method signatures, I have an object as the return type, and then return an HttpResult with the response. For instance:
public object Get(Request request) { return new HttpResult(responseObj); }
Do I have any alternative besides the fact that you use the services of a client?
I have a service and DTO only for views that consume other services from plugins. Therefore, I need to edit the DTO correctly (the services for the views act as controllers).
source share