Skip to content
A collection of extension methods providing strongly typed link generation for ASP.NET MVC 5 projects.
Branch: master
Clone or download
Latest commit a14a62f Feb 1, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
System.Web.Mvc.Expressions Compile fix Jan 31, 2017
.gitignore Added NuGet package Aug 19, 2016
LICENSE Initial commit Dec 2, 2014
System.Web.Mvc.Expressions.1.0.6.nupkg Version 1.0.6 (closes #15) Jan 12, 2017
System.Web.Mvc.Expressions.sln RouteArea attribute is now considered when extracting area name (closes Dec 1, 2016
logo.png Added logo Aug 19, 2016

MyTested.AspNetCore.Mvc  ASP.NET-MVC-Lambda-Expression-Helpers - Typed
  link generation for ASP.NET MVC

===================================== Extension methods allowing using Lambda Expressions instead of magic strings in your ASP.NET MVC 5 application. It resolves all route values, including areas and parameters in the method expression.

Build status license NuGet Badge

To install from NuGet:

Install-Package System.Web.Mvc.Expressions

For other interesting packages check out:

Currently supported in Controller (add "using System.Web.Mvc.Expressions;"):

- RedirectToAction<HomeController>(c => c.Index())

- RedirectToActionPermanent<HomeController>(c => c.Index())

- AddModelError<FooInputModel>(m => m.Bar, "Invalid value for Bar.")

- AddModelError<FooInputModel>(m => m.Baz, new ArgumentException("Invalid value for Baz.")

Currently supported in Views (add namespace "System.Web.Mvc.Expressions" to the web.config file in the Views folder):

- Html.ActionLink<HomeController>(c => c.Index(5))

- Html.BeginForm<HomeController>(c => c.Index(5))

- Html.RenderAction<HomeController>(c => c.Index(5))

- Html.Action<HomeController>(c => c.Index(5))

- Url.Action<HomeController>(c => c.Index(5))

- Ajax.ActionLink<HomeController>(c => c.Index(5))

- Ajax.BeginForm<HomeController>(c => c.Index(5))

More info:

  • Support for areas out of the box.
  • Support for attribute routing - RouteAttribute, RoutePrefixAttribute and RouteAreaAttribute.
  • Support for ActionNameAttribute which value overrides the action name when generating URL.
  • Support for URL generation to async controller actions.



You can’t perform that action at this time.