Source code is on GitHub
If you download the source code, it includes an example application, which should help to get you started.
Package on NuGet
Read the original blog post: Strongly typed routing for Microsoft MVC4
Source code is on GitHub
If you download the source code, it includes an example application, which should help to get you started.
Package on NuGet
Read the original blog post: Strongly typed routing for Microsoft MVC4
Hello,
I am trying to use your project in vb.net but I get the following errors:
Value of type ‘System.Web.Mvc.ActionResult’ cannot be converted to ‘System.Func(Of System.Web.Mvc.ActionResult)
Code is:
Imports System.Web.Routing
Imports Dysphoria.Net.UrlRouting
Public Class SiteUrls
Inherits Urls
Public Shared ContactUs As UrlPattern = Path(“contacts”)
Shared Sub Register(routes As RouteCollection)
routes.ForController(Of HomeController).MapRoute(ContactUs.Get, Function(c) c.Contacts)
End Sub
End Class
Looks fine to me according to your documentation on how to map routes.
Hi Simone, What’s your code for
HomeController.Contacts
? “Contacts” needs to be a method which returns anActionResult
. It looks like it might be a property rather than a method…?