Code Nanites for CSHTML/Razor view generation
$ dotnet add package ZeraSystems.CodeNanite.CshtmlCSHTML and Razor view generation code nanites for the CodeStencil template engine.
This package provides specialized code nanites for generating ASP.NET MVC and Razor Pages views (CSHTML files). It extends the core CodeNanite.Expansion functionality with powerful view generation capabilities for creating complete CRUD interfaces.
Install-Package ZeraSystems.CodeNanite.Cshtml -Version 2.0.0
dotnet add package ZeraSystems.CodeNanite.Cshtml --version 2.0.0
<PackageReference Include="ZeraSystems.CodeNanite.Cshtml" Version="2.0.0" />
This package is designed to be used within CodeStencil templates for generating ASP.NET MVC/Razor views.
In your CodeStencil template:
<%@ template language="C#" %>
<%@ import namespace="ZeraSystems.CodeNanite.Cshtml" %>
@model IEnumerable<<%= CurrentTable() %>>
<h1><%= CurrentTableLabel() %></h1>
<table class="table">
<thead>
<%= CshtmlTableHead() %>
</thead>
<tbody>
<%= CshtmlTableBody() %>
</tbody>
</table>
@model <%= CurrentTable() %>
<h2>Create <%= CurrentTableLabel() %></h2>
<form asp-action="Create">
<%= CshtmlFormGroup() %>
<button type="submit" class="btn btn-primary">Create</button>
</form>
public class <%= CurrentTable() %>Controller : Controller
{
<%= CshtmlController() %>
}
All generated views are Bootstrap-ready with:
For complete documentation and examples:
This package is licensed under the MIT License.
For support and questions:
For any questions or feedback, please contact us at support@codestencil.com
Copyright � 2018-2025 ZERA Systems Inc.