c# - ASP.NET Web Api Help Page doesn't show any tips -
i have working pages (start mvc 4 project , web api) , enable documentation , still working. working time , @ api , see this:
i can't find out change cause this. tried reinstall package pages didn't help. can cause this? how fix it?
edit:
helppagearearegistration:
public class helppagearearegistration : arearegistration { public override string areaname { { return "helppage"; } } public override void registerarea(arearegistrationcontext context) { context.maproute( "helppage_default", "help/{action}/{apiid}", new { controller = "help", action = "index", apiid = urlparameter.optional }); helppageconfig.register(globalconfiguration.configuration); } }
web api routes registration same default.
public static class webapiconfig { public static void register(httpconfiguration config) { config.routes.maphttproute( name: "defaultapi", routetemplate: "api/{controller}/{id}", defaults: new { id = routeparameter.optional } ); // uncomment following line of code enable query support actions iqueryable or iqueryable<t> return type. // avoid processing unexpected or malicious queries, use validation settings on queryableattribute validate incoming queries. // more information, visit http://go.microsoft.com/fwlink/?linkid=279712. //config.enablequerysupport(); // disable tracing in application, please comment out or remove following line of code // more information, refer to: http://www.asp.net/web-api // config.enablesystemdiagnosticstracing(); } }
edit2:
example of apicontroller:
public class citycontroller : apicontroller { private icityrepository cityrepository; public citycontroller(icityrepository repository) { cityrepository = repository; } /// <summary> /// cities database /// </summary> /// <returns>all cities</returns> [outputcache(cacheprofile = "cache1hour")] public ienumerable<city> get() { return cityrepository.getallcities(); } }
weekmenucontroller:
public class weekmenucontroller : apicontroller { private weekmenurepository repo; public weekmenucontroller() { repo = new weekmenurepository(); } ...
restaurantcontroller:
public class restaurantcontroller : apicontroller { private restaurantrepository _repo; public restaurantcontroller() { _repo = new restaurantrepository(); } ...
daymenucontroller:
public class daymenucontroller : apicontroller { private daymenurepository repo; public daymenucontroller() { repo = new daymenurepository(); } ...
actionrepository:
public class actioncontroller : apicontroller { private iactionrepository _repository; public actioncontroller(iactionrepository repository) { _repository = repository; } ...
Comments
Post a Comment