Created
November 26, 2015 10:24
-
-
Save albertoventurini/ca1c71cb5d9a244212b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Startup | |
{ | |
// This method is required by Katana: | |
public void Configuration(IAppBuilder app) | |
{ | |
var webApiConfiguration = ConfigureWebApi(); | |
// Use the extension method provided by the WebApi.Owin library: | |
app.UseWebApi(webApiConfiguration); | |
} | |
private HttpConfiguration ConfigureWebApi() | |
{ | |
var config = new HttpConfiguration(); | |
config.Routes.MapHttpRoute( | |
"DefaultApi", | |
"api/{controller}/{id}", | |
new { id = RouteParameter.Optional }); | |
return config; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment