Git Product home page Git Product logo

asp.net-mvc-lambda-expression-helpers's Introduction

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.

Authors:

Contributors:

asp.net-mvc-lambda-expression-helpers's People

Contributors

fr8tra1n avatar ivaylokenov avatar vladislav-karamfilov avatar waynebrantley avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.