Web API optional parameters

前端 未结 3 560
野性不改
野性不改 2020-12-13 23:31

I have a controller with the following signature:

[Route(\"products/filter/{apc=apc}/{xpc=xpc}/{sku=sku}\")]
public IHttpActionResult Get(string apc, string          


        
3条回答
  •  渐次进展
    2020-12-14 00:09

    Sku is an int, can't be defaulted to string "sku". Please check Optional URI Parameters and Default Values

提交回复
热议问题