.NET Model Binders

耗尽温柔 提交于 2019-12-04 01:27:55

I am not MS folk but I think here is the answer -

  1. System.Web.ModelBinding is for ASP.Net WebForms applications

http://msdn.microsoft.com/en-us/library/system.web.modelbinding(v=vs.110).aspx

The System.Web.ModelBinding namespace provides classes that enable you to bind data objects to ASP.NET Web Forms server controls.

  1. System.Web.Mvc is for ASP.Net MVC

http://msdn.microsoft.com/en-us/library/system.web.mvc(v=vs.118).aspx

The System.Web.Mvc namespace contains classes and interfaces that support the ASP.NET Model View Controller (MVC) framework for creating Web applications. This namespace includes classes that represent controllers, controller factories, action results, views, partial view, model binders, and much more.

  1. System.Web.Http.ModelBinding is for ASP.Net Web API

http://msdn.microsoft.com/en-us/library/system.web.http.modelbinding(v=vs.118).aspx

This namespace is for Web API 2

In short, all three frameworks are independent of each other. And you should remember that, they are separately deployable frameworks. Therefore it is necessary to keep all of them. If you don't need a particular one, then remove it from your referenced assemblies. They are not dependent to each other. They are all from separate frameworks they are all used for the purpose best fits.

It is the feature of the intellisense or resharper like tools that they can list all. But you are the one who should pick the right one based on your framework and your need. But usually they are all available in a .net framework full version and probably serve the same work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!