【发布时间】:2015-10-07 09:55:05
【问题描述】:
我想根据我的查询字符串参数路由两个不同的 RequestDTO 类。 PFB 两种情况。
Scenario 1:-
localhost:8080/myservice?type="abc" //Service URL
// should be called below DTO class
public class TypeRequestDTO //DTO
{
public string type;
}
Scenario 2:-
--------------------------------------------------
localhost:8080/myservice?Name="xyz" //Service URL
// should be called below DTO class
public class NameRequestDTO //DTO
{
public string Name;
}
在这两种情况下,base url 相同 (/myservice) 但我想根据querystring parameter 进行路由。有没有办法做到这一点。
【问题讨论】:
标签: servicestack