Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 537 Bytes

File metadata and controls

21 lines (18 loc) · 537 Bytes

ASP.NET Core MVC Tools

Allows to structure controllers like example below instead of separated controllers and views folders.

  • Controllers
    • Home
      • Views
        • Index.cshtml
      • HomeController.cs
      • HomeModel.cs
    • _Layout.cshtml
    • _ViewImports.cshtml
    • _ViewStart.cshtml

Requires to be configured as RazorViewEngineOptions

//Startup.cs configuration: 
services.Configure<RazorViewEngineOptions>(options => {
    options.ViewLocationExpanders.Add(new ControllerViewLocationExpander("Controllers"));
});