Skip to content

kunah/SpawnDto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpawnDto

.NET tool for automatic generation of DTOs

Install

Package

For annotations.

dotnet add package SpawnDto.Core

Tool

For generating DTOs.

dotnet tool install SpawnDto --create-manifest-if-needed

Run

dotnet spawndto -a [assembly] --dto [dto-output-path] -n [dto-namespace] --convertorOutputPath [convertor-path] --convertorNamespace [convertor-namespace]

Post build event

Add this to you .csproj file.

<Target Name="Generate DTOs" AfterTargets="PostBuildEvent">
    <Exec Command="dotnet spawndto -a $(OutDir)$(TargetName).dll  --dto [dto-output-path] -n [dto-namespace] --convertorOutputPath [convertor-path] --convertorNamespace [convertor-namespace]" ContinueOnError="false" />
</Target>

This will generate DTOs every time after the project is build.

TODO: Implement the logic for generating convertors that can be used by DI.

About

.NET tool for automatic generation of Dtos

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages