Can a WCF service contract have a nullable input parameter?

前端 未结 4 1607
-上瘾入骨i
-上瘾入骨i 2021-02-03 10:13

I have a contract defined like this:

[OperationContract]
[WebGet(UriTemplate = \"/GetX?myStr={myStr}&myX={myX}\", BodyStyle = WebMessageBodyStyle.Wrapped)]
s         


        
4条回答
  •  無奈伤痛
    2021-02-03 11:06

    Hum, the quick solution (not pretty) is to accept the nullable parameter as a string in the WCF respective Interface and Service codes.

提交回复
热议问题