Created
January 25, 2013 17:18
-
-
Save dgfitch/4636234 to your computer and use it in GitHub Desktop.
VB Area API routes
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 Overrides Sub RegisterArea(ByVal context As System.Web.Mvc.AreaRegistrationContext) | |
'' general api routes | |
context.MapRoute( | |
"api_default_sub_resource", | |
"api/v1/{controller}/{resource}/{subresource}/{action}.xml", | |
New With {.version = "1"} | |
) | |
context.MapRoute( | |
"api_default_resource", | |
"api/v1/{controller}/{resource}/{action}.xml", | |
New With {.version = "1"} | |
) | |
context.MapRoute( | |
"api_default", | |
"api/v1/{controller}/{action}.xml", | |
New With {.version = "1"} | |
) | |
'' not found | |
context.MapRoute( | |
"api_not_found", | |
"api/{path*}", | |
New With {.controller = "misc", .action = "notFound"} | |
) | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment