阅读背景:

ASP .NET Web API控制器动作的参数为null但ModelState.IsValid仍为true,为什么?

来源:互联网 

Question says it all, I have a Web API controller action, that takes a POCO. It's a POST action, and I'm intentionally not posting the parameter to the action, however the ModelState.IsValid property still shows true. Why would that be? Is there an attribute that I have to set on the controller action and its parameters to enforce the validation?Question says it all, I have a Web API controll




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: