Skip to content
forked from T4MVC/R4MVC

R4MVC is a Roslyn code generator for ASP.NET Core MVC apps that creates strongly typed helpers that eliminate the use of literal strings in many places

License

Notifications You must be signed in to change notification settings

enricosoft/R4MVC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R4MVC

R4MVC is a Roslyn based code generator for ASP.NET MVC Core apps that creates strongly typed helpers that eliminate the use of literal strings in many places.

It is a re-implementation of T4MVC for ASP.NET Core projects.

R4MVC runs in the dotnet cli or in Visual Studio 2017/2019/2022, and supports ASP.NET Core MVC 1 and 2

Benefits

Instead of

@Html.ActionLink("Dinner Details", "Details", "Dinners", new { id = Model.DinnerID }, null)

R4MVC lets you write

@Html.ActionLink("Dinner Details", MVC.Dinners.Details(Model.DinnerID))

When you're using tag helpers, instead of

<a asp-action="Details" asp-controller="Dinners" asp-route-id="@Model.DinnerID">Dinner Details</a>

you can write (after registering R4Mvc tag helpers in _ViewImports.cshtml with the directive: @addTagHelper *, R4Mvc)

<a mvc-action="MVC.Dinners.Details(Model.DinnerID)">Dinner Details</a>

and that's just the beginning!

Use the following links to get started

  • Discuss: Discuss it on GitHub

About

R4MVC is a Roslyn code generator for ASP.NET Core MVC apps that creates strongly typed helpers that eliminate the use of literal strings in many places

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 87.7%
  • PowerShell 12.3%