且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用查询字符串参数消除UriTemplate匹配的歧义

更新时间:2022-06-06 00:33:51

根据

According to This post, it is not possible, you would have to do something like:

[OperationContract]
[WebGet(UriTemplate = "people/driversLicense/{driversLicense}")]
string GetPersonByLicense(string driversLicense);

[OperationContract]
[WebGet(UriTemplate = "people/ssn/{ssn}")]
string GetPersonBySSN(string ssn);