Guest User

Untitled

a guest
Jan 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public class Startup
  2. {
  3. public void Configuration(IAppBuilder app)
  4. {
  5. var webApiConfiguration = ConfigureWebApi();
  6.  
  7. // Use the extension method provided by the WebApi.Owin library:
  8. app.UseWebApi(webApiConfiguration);
  9. }
  10.  
  11.  
  12. private HttpConfiguration ConfigureWebApi()
  13. {
  14. var config = new HttpConfiguration();
  15. config.Routes.MapHttpRoute(
  16. "DefaultApi",
  17. "api/{controller}/{id}",
  18. new { id = RouteParameter.Optional });
  19. return config;
  20. }
  21. }
Add Comment
Please, Sign In to add comment