DTO Best Practives Building

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
lixaotec
Posts: 6
Joined: Fri 07 Jun 2019 20:07

DTO Best Practives Building

Post by lixaotec » Tue 09 Jul 2019 14:11

Dear folks,

What are the best practices on using ED for building DTO classes?

I mean, I´m trying to accomplish something like LLBLGen Pro allows in order to build a DTO complex type (derived from entities).

Image

https://www.llblgen.com/Documentation/5 ... Models.htm

Is it possible?

How can I build such classes in ED without just 'cloning' entity with DTO template generator.

Thanks

Shalex
Site Admin
Posts: 8905
Joined: Thu 14 Aug 2008 12:44

Re: DTO Best Practives Building

Post by Shalex » Tue 16 Jul 2019 09:49

EF Core Model (*.efml) includes a predefined template Data Transfer Object for generating DTO classes. You can add the template via the context menu of the Templates node in Model Explorer.

If you want to exclude some class / complex type / property / relation property / association from the generated DTO class, set Generate DTO=false in the Extended Properties section of the corresponding member.

Is that what you need? If the designer for DTO classes is required, please create a separate diagram (or separate model) for managing DTO classes.

Post Reply