Page 1 of 1

DTO Best Practives Building

Posted: Tue 09 Jul 2019 14:11
by lixaotec
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

Re: DTO Best Practives Building

Posted: Tue 16 Jul 2019 09:49
by Shalex
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.