Dhgms.Nucleotide.Generators 4.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package Dhgms.Nucleotide.Generators --version 4.0.5
                    
NuGet\Install-Package Dhgms.Nucleotide.Generators -Version 4.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dhgms.Nucleotide.Generators" Version="4.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dhgms.Nucleotide.Generators" Version="4.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Dhgms.Nucleotide.Generators" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dhgms.Nucleotide.Generators --version 4.0.5
                    
#r "nuget: Dhgms.Nucleotide.Generators, 4.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Dhgms.Nucleotide.Generators@4.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dhgms.Nucleotide.Generators&version=4.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Dhgms.Nucleotide.Generators&version=4.0.5
                    
Install as a Cake Tool

Nucleotide

Mission Statement

To provide a tool that automatically generates repeditive .NET code to allow better use of developers time.

Introduction

Nucleotide is a library to aid in the generation of .NET code for manipulation the following types of objects:

  • Client\Server Services (Interfaces)
  • Commands (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)
  • MVC Controllers (Classes)
  • Queries (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 DSL style model with the power of the compiler to give a simple way to generate code.

Credits

Getting Started

Pre-requisites

You will need:

  • An IDE \ Build chain that supports Roslyn (Recent versions of VSCode, Visual Studio, Jetbrains Rider, etc.)
  • A project using
    • A supported version of .NET core (Version 8)
    • C# 9 language compiler settings or later

Before you start

You can use the following project structure

  • Your generation model sits in a project above the project where it will be generated
flowchart TD
  GenProject(Generation Project) --> TargetProject(TargetProject)
  • You can also have a common model, then sub projects used to generate specific code
flowchart TD
  CommonModel(Common Model Project) --> MvcGenProject(ASP.NET Core MVC Service Generation Project)
  MvcGenProject --> MvcSvcProject(ASP.NET Core MVC Project)
  CommonModel --> WebApiSvcGenProject(ASP.NET Core Web API Service Generation Project)
  CommonModel --> WebApiClientGenProject(Web API Client Generation Project)
  CommonModel --> WpfAppGenProject(Wpf App Generation Project)
  CommonModel --> CommonProject(Common Shared Code Project)
  WebApiClientGenProject --> WebApiClientProject(Web API Client Project)
  WebApiSvcGenProject --> WebApiSvcProject(Web API Service Project)
  WpfAppGenProject --> WpfAppProject(WPF App Project)
  CommonProject -.-> MvcSvcProject
  CommonProject -.-> WebApiClientProject
  CommonProject -.-> WebApiSvcProject
  CommonProject -.-> WpfAppProject

NOTE: There is an intention to simplify this use case to reduce the number of proxy projects.

flowchart TD
  CommonGenerationModel(Common Generation Model Project) --> MvcSvcProject(ASP.NET Core MVC Service Project)
  CommonGenerationModel --> CommonProject(Common Shared Code Project)
  CommonGenerationModel --> WebApiClientProject(Web API Client Project)
  CommonGenerationModel --> WebApiSvcProject(Web API Service Project)
  CommonGenerationModel --> WpfAppProject(WPF App Project)
  CommonProject -.-> MvcSvcProject
  CommonProject -.-> WebApiClientProject
  CommonProject -.-> WebApiSvcProject
  CommonProject -.-> WpfAppProject
  1. 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.

Install-Package Dhgms.Nucleotide

Get the package (Dual Project)

In project1.

  1. Install-Package Dhgms.Nucleotide

  2. Add Your Code Generation Models

  3. Inherit the Code Generation Attributes.

In project2.

  1. Reference Project1.

  2. Install-Package Dhgms.Nucleotide

  3. Apply the Assembly Code Generation Attributes.

Get started with a Code Generation Model

TODO.

Apply a Model Generation Attribute

TODO.

Viewing the documentation

The documentation can be found at http://dpvreony.github.io/nucleotide/

Contributing to the code

See the contribution guidelines.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Dhgms.Nucleotide.Generators:

Package Downloads
Dhgms.Nucleotide.Attributes

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.9 584 5/28/2025
4.0.5 231 5/9/2025
4.0.1 166 5/8/2025
3.2.326 1,220 12/20/2024
3.2.305 746 9/30/2024
3.2.300 173 9/19/2024
3.2.299 160 9/18/2024
3.2.284 394 8/10/2024
3.2.281 179 7/22/2024
3.2.280 172 7/19/2024
3.2.262 328 5/22/2024
3.2.235 589 2/2/2024
3.2.228 424 12/31/2023
3.2.225 210 12/22/2023
3.2.223 235 12/17/2023
3.2.222 166 12/17/2023
3.2.189 941 8/31/2023
3.2.186 300 8/22/2023
3.2.131 1,226 12/27/2022
3.2.27 1,913 2/11/2022
3.2.20 548 1/18/2022
3.2.18 571 1/11/2022
3.2.17 548 1/10/2022
3.2.13 371 1/6/2022
3.2.2 803 10/31/2021
3.1.3 791 9/11/2021
3.1.1 560 8/24/2021
3.0.10 1,695 1/31/2021
3.0.9 442 1/30/2021
3.0.8 495 1/30/2021
3.0.7 441 1/27/2021
3.0.6 472 1/27/2021
3.0.5 468 1/25/2021
2.0.0 2,968 4/12/2020