简体   繁体   中英

Performance of asp.net WebAPI vs. asp.net MVC controller emmiting JSON?

有谁知道使用WebAPI是否有性能优势,而不仅仅是使用返回JSON的MVC控制器?

I think the benefits are more related to flexibility than performance. You can implement a rest service using the MVC way, but the Web API provides a cleaner model: the actions are implicit in the HTTP verbs, the content can be delivered both in JSON and XML, there is native support to return an IQueryable< T > (this can be seen as a small performance improvement), and it can be integrated with an ASP.NET Web Forms application (or even a console app, with no ASP.NET at all).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM