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
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

R4MVC

Build status R4Mvc on NuGet
CI build: R4Mvc on MyGet

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, 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