To provide a tool that automatically generates repeditive .NET code to allow better use of developers time.
This project is in a beta phase and tied to work being done in https://github.com/dpvreony/whipstaff, development is slow due to COVID workload.
Nucleotide is a library to aid in the generation of .NET code for manipulation the following types of objects:
- Client\Server Services (Interfaces)
- Commands (Interfaces and Classes)
- Command Factory (Interfaces and Classes)
- Entity Framework DbSet (Classes)
- Entity Framework Models (Classes)
- Entity Framework Entity Type Configuration (Classes)
- Entity Framework Parent and Child Foreign Keys Representation (Interfaces)
- Models (Interfaces and Classes)
- Queries (Interfaces and Classes)
- Query Factories (Interfaces and Classes)
- Request DTO POCO Objects (Classes)
- Response DTO POCO Objects (Classes)
- SignalR Hubs (Classes)
- WCF Service classes (Classes)
- Web Api Client (Classes)
- Web Api Controllers (Classes)
This project leverages Roslyn functionality to combine a simple DSL style model with the power of the compiler to give a simple way to generate code.
This version of Nucleotide is built upon CodeGenerators.Roslyn, this has allowed the removal of dependency on -.tt files.
You will need:
- Visual Studio 2019
- A project using
- netcore 3.1 upward
- C# 8 language compiler settings or later
Before you start
You can use the following project structure
- Your code generation model and the generated code are in the same project.
- Your code generation model is in Project1, while your generated code is in Project2.
Get the package (Single Project)
You want to install Nucleotide in the project where you want to place your generated model.
Get the package (Dual Project)
Add Your Code Generation Models
Inherit the Code Generation Attributes.
Apply the Assembly Code Generation Attributes.
Get started with a Code Generation Model
Apply a Model Generation Attribute
Viewing the documentation
The documentation can be found at http://dpvreony.github.io/nucleotide/
Contributing to the code
See the contribution guidelines.