Dysphoria.Net.UrlRouting 3.1.0.34592

dotnet add package Dysphoria.Net.UrlRouting --version 3.1.0.34592
                    
NuGet\Install-Package Dysphoria.Net.UrlRouting -Version 3.1.0.34592
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dysphoria.Net.UrlRouting" Version="3.1.0.34592" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dysphoria.Net.UrlRouting" Version="3.1.0.34592" />
                    
Directory.Packages.props
<PackageReference Include="Dysphoria.Net.UrlRouting" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dysphoria.Net.UrlRouting --version 3.1.0.34592
                    
#r "nuget: Dysphoria.Net.UrlRouting, 3.1.0.34592"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Dysphoria.Net.UrlRouting@3.1.0.34592
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dysphoria.Net.UrlRouting&version=3.1.0.34592
                    
Install as a Cake Addin
#tool nuget:?package=Dysphoria.Net.UrlRouting&version=3.1.0.34592
                    
Install as a Cake Tool

typed-url-routing

This is a library which adds strong static typing to the URL-routing and link generation in Microsoft's MVC4 (and MVC5).

It lets you:

  • Define your application’s URL routes as statically-typed, first-class-objects
  • Bind routes to controller actions, in such a way that the compiler catches your mistakes (like parameter mismatches or misspellings)
  • Generate links in your Razor code (a) succinctly and (b) checked at compile-time.
  • Use Visual Studio refactoring to rename routes or actions, automatically—without missing any references.

The key things you need to know are:

  • It all works at compile time. You don’t need to run a program to generate code or anything like that. Just include the assembly in your project and start using it.
  • You will write less code.

I’ve used it so far in a 3 commercial web projects:

  1. A small intranet system for an energy supplier;
  2. In the business-to-business website and associated back-office systems for a logistics company;
  3. Intranet system for an international electronics recycling company.

It’s reached a level of maturity where it’s much more comfortable to use than the built-in, dynamically-typed, MVC routing system.

It now has a website, including an introductory tutorial:

http://url-routing.dysphoria.net

Here’s the original blog post which explains the project:

https://dysphoria.net/2013/03/14/strongly-typed-action-references-in-microsoft-mvc4/

I can’t offer commercial support at the moment, but please get in touch if you’re using it. Do let me know of any problems you have with it, or suggestions. Also, pull requests for improvements are very welcome!

–Andrew Forrest

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.1.0.34592 187 6/1/2026
3.0.2.26366 32,107 10/21/2022
3.0.1.19546 726 10/12/2022
3.0.0.30081 1,044 10/6/2022
2.2.1.37986 136,906 5/31/2014
2.2.0.18408 1,885 5/31/2014
2.1.0.39834 2,001 1/20/2014
2.0.0.19626 1,987 12/18/2013

Can now specify an application path in HttpContext.Items which overrides the value of HttpRequest.ApplicationPath for URL generation (resolution).