Can you generate multiple DTOs at a time in the DTOClasses Derived Models

Posts   
 
    
clint
User
Posts: 150
Joined: 15-Nov-2005
# Posted on: 12-Aug-2021 23:34:35   

LLBLGen Designer version 5.6.1.

I'm learning how to use the DTOClasses Derived Model. Is there a way to generate DTOs for all the Entities in one step? You can reverse-engineer all the database tables into entities in one step, so I figured there would be something similar to generate DTOs for all the entities in one step.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39747
Joined: 17-Aug-2003
# Posted on: 13-Aug-2021 09:37:54   

A plugin could do this, it's not implemented by default as the philosophy is that the DTO model should match your data usage patterns while the entity model should match how the data is defined in reality. It's not likely they're 1:1 the same.

Adding a bunch of entities to a DTO is done with this method: https://www.llblgen.com/Documentation/5.8/ReferenceManuals/Designer/html/AB86DF7A.htm Fields that are removed from an entity are removed from a DTO as well, however new fields in an entity aren't automatically added to a DTO for the same reason as we don't add new DTOs for a new entity.

Frans Bouma | Lead developer LLBLGen Pro