Home

Awesome

CodegenCS is a Toolkit for doing Code Generation using plain C#.

Before anything else, don't forget to read read the Main Project Page to learn the basics (basic idea, basic features, and major components).

This page is only about CodegenCS Sample Templates:

CodegenCS Templates

This is the official repository for out-of-the-box templates. You can fork and modify these templates or you can create your own.

For instructions on how to use the templates below please refer to dotnet-codegencs documentation.

To learn more about how to modify the templates (and learn how to write clean and reusable templates using String Interpolation / Raw String Literals / IEnumerables) please check CodegenCS Library documentation.

DatabaseSchema templates

DatabaseSchema is our out-of-the-box template that represents the schema of a relational database.

CLI Tool (dotnet-codegencs) can be used to extract the model from a Microsoft SQL Server (MSSQL) or PostgreSQL.

Check out the available DatabaseSchema Templates which generate output based on a database schema.

OpenAPI templates

OpenAPI (Swagger) templates are read using NSwag and can be used to generate templates based on OpenAPI (REST API) model.

Check out the available OpenAPI Templates which generate output based on a OpenAPI (Swagger) model.

License

MIT License