When we use WEBAPI, we encounter some problems, such as
1.POST How to request
2. How to be compatible with JSONP requests
3. How to provide cross-domain requests to the specified end
4. How to display the annotations of a separate models layer
Question one or two other people are playing more mature, Baidu a few thousands of answers.
This article is about question 4
Say the steps on the line, do not want to type anyway is someone else there copied directly on the original
http://stackoverflow.com/questions/21895257/ How-can-xml-documentation-for-web-api-include-documentation-from-beyond-the-main
Because if the models of the project itself can be annotated, why not go out alone?
The article probably explains that when we use the project in area we generate an XML comment file for it, which is generated for the project itself, and when your model goes out alone, it just generates an XML file for the model layer alone. And then he's assigned his line in the HelpPageConfig.cs.
Config. Setdocumentationprovider (New Multixmldocumentationprovider (HttpContext.Current.Server.MapPath ("~/app_data/ Xmldocument.xml "), HttpContext.Current.Server.MapPath (" ~/app_data/muzuapi.model.xmldocument.xml "));
Sort out some trivial things about webapi.