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
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.
You want to install Nucleotide in the project where you want to place your generated model.
Install-Package Dhgms.Nucleotide
In project1.
-
Install-Package Dhgms.Nucleotide
-
Add Your Code Generation Models
-
Inherit the Code Generation Attributes.
In project2.
-
Reference Project1.
-
Install-Package Dhgms.Nucleotide
-
Apply the Assembly Code Generation Attributes.
TODO.
TODO.
The documentation can be found at http://dpvreony.github.io/nucleotide/
See the contribution guidelines.