I am looking at the new api that came out 2 weeks ago. It seems like
ReqDTO : IReturn<List<ResDTO>> { //... }
The “IReturn” bit seems to be optional? The DTOs in RazorRockstars demo project works without it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is a new addition in ServiceStack’s New API which allows you to document the expected Response Type that the Request DTO will return, e.g. with
Which lets you call using any of the C# Service Clients with:
If you didn’t have the IReturn marker your client call would have to look like:
Which is something the client/consumer of your service needs to know about. If you had the marker on the DTO the response type is already known.
The
IReturn<>marker is also used to determine the Response DTO that’s used in the HTTP Responses in ServiceStack’s/metadatapages.