ZeraSystems.CodeNanite.Cshtml v2.0.0 — nugetz
ayodahunsi/ ZeraSystems.CodeNanite.Cshtml v2.0.0 .NET 10.0-windows7.0
Code Nanites for CSHTML/Razor view generation
Get Started dotnet CLI PackageReference Package Manager
$ dotnet add package ZeraSystems.CodeNanite.CshtmlReadme ZeraSystems.CodeNanite.Cshtml
CSHTML and Razor view generation code nanites for the CodeStencil template engine.
Overview
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.
Features
CSHTML View Generation
CshtmlController : Generate ASP.NET MVC controller actions
CshtmlIndex : Create index/list views with tables
CshtmlDetails : Generate details/display views
CshtmlCreate : Create form views for entity creation
CshtmlEdit : Generate edit forms for entities
CshtmlFormGroup : Build Bootstrap form groups
HTML Component Generation
CshtmlTableHead : Generate table headers
CshtmlTableBody : Create table body rows with data binding
GetInputComponent : Determine appropriate input controls based on data types
CshtmlHtmlDisplay : Generate display templates
CshtmlFormGroup : Create responsive form layouts
Advanced Features
CshtmlIncludeThenInclude : Generate Entity Framework Include/ThenInclude statements
MegaMenu : Create hierarchical navigation menus
Target Frameworks
.NET Framework 4.8
.NET 10.0 (Windows)
Installation
Package Manager Console
Install-Package ZeraSystems.CodeNanite.Cshtml -Version 2.0.0
.NET CLI
dotnet add package ZeraSystems.CodeNanite.Cshtml --version 2.0.0
PackageReference <PackageReference Include="ZeraSystems.CodeNanite.Cshtml" Version="2.0.0" />
Usage This package is designed to be used within CodeStencil templates for generating ASP.NET MVC/Razor views.
Example: Generate Index View 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>
Example: Generate Create Form @model <%= CurrentTable() %>
<h2>Create <%= CurrentTableLabel() %></h2>
<form asp-action="Create">
<%= CshtmlFormGroup() %>
<button type="submit" class="btn btn-primary">Create</button>
</form>
Example: Generate Controller public class <%= CurrentTable() %>Controller : Controller
{
<%= CshtmlController() %>
}
Generated Components
Views
Index Views : List/grid views with sorting and filtering
Details Views : Read-only display views
Create Views : Forms for creating new entities
Edit Views : Forms for editing existing entities
Delete Views : Confirmation views for deletion
Form Elements
Text inputs for string fields
Number inputs for numeric fields
Date pickers for DateTime fields
Checkboxes for boolean fields
Select dropdowns for foreign keys
Textarea for long text fields
Bootstrap Integration All generated views are Bootstrap-ready with:
Responsive grid layouts
Form validation styling
Button styling
Table styling
Alert messages
Dependencies
ZeraSystems.CodeStencil.Contracts (v2.0.0+)
ZeraSystems.CodeNanite.Expansion (v2.0.0+)
System.ComponentModel.Composition (v4.6.0+ for .NET Framework, v10.0.0+ for .NET 10)
Code Nanite Categories
Controller Generation
CRUD action methods
Async/await support
Entity Framework integration
ViewBag/ViewData setup
View Generation
Strongly-typed views
Form helpers
HTML helpers
Validation helpers
HTML Components
Tables with sorting
Forms with validation
Navigation menus
Display templates
Documentation For complete documentation and examples:
Version History
2.0.0
Upgraded to .NET 10.0 support
Maintained .NET Framework 4.8 compatibility
Updated to CodeStencil.Contracts 2.0.0
Updated System.ComponentModel.Composition to v10.0.0 for .NET 10
Converted to SDK-style project format
Added support for modern Razor syntax
1.5.x
Previous stable release for .NET Framework 4.8
License This package is licensed under the MIT License.
Support For support and questions:
Contact
Copyright Copyright � 2018-2025 ZERA Systems Inc.