I am not actually doing routing here, but I kind of need to reuse the reverse-routing built into ServiceStack.
Here is my problem, I am trying to populate a string that is a route, with the data in the current Request DTO.
-
I have the IRequest
-
The current DTO is defined like this:
public class MyDto
{
public string Id1{get;set;}
public string Id2{get;set;}
}
I have a route string: “/resource/{Id1}/another/{Id2}/another” (not the same route as the MyDto
Assuming the current IRequest has an instance of the MyDto, I want to apply reverse routing, using the MyDto instance and the route above to yield this:
“/resource/5/another/6/another”
How do I do that using SS code?