Using WebAPI or MVC to return JSON in ASP.NET

前端 未结 6 420
闹比i
闹比i 2020-12-04 07:50

I\'m building an ASP.NET MVC application that is client-script heavy, it will use JSON and jQuery to manipulate the DOM.

My understanding is both Web API Con

6条回答
  •  忘掉有多难
    2020-12-04 08:48

    The only concern I have with ApiController is that it is site-based not area-based. One site can only have one apicontroller subfolder for you to name your controller methods. There are situations you might want to duplicate controller name in different areas :

    domain.com/api/area1/controller1/

    domain.com/api/area2/controller1/

    I remember there are some custom code settings to be able to do this but it does not work by default.

提交回复
热议问题