ASP.NET MVC: ModelState vs. ModelStateDictionary

前端 未结 6 1690
予麋鹿
予麋鹿 2021-02-04 09:32

I have a service which has a method that\'s called when a certain controller method is triggered.

My service returns a custom result object PlacementResult in w

6条回答
  •  时光说笑
    2021-02-04 09:55

    This is a good link that shows how a service can perform validation and communicate the result back to the controller:

    http://www.asp.net/mvc/tutorials/validating-with-a-service-layer-cs (fixed link)

提交回复
热议问题