Data Annotations Attributes in Data Transfer Objects Template Entity Developer 6.4.775

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
PixelHunter
Posts: 17
Joined: Thu 29 Jun 2017 11:07

Data Annotations Attributes in Data Transfer Objects Template Entity Developer 6.4.775

Post by PixelHunter » Mon 05 Aug 2019 13:39

Hi!

I am building an Api using EF Core.

Is there a way to add Data Annotations attributes in the 'Data Transfer Objects' template? I would like to validate the Model through the Dtos, not directly in the Model itself (as it appears to be with the Data Annotations Metadata Template).

Thanks in advance!

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

Re: Data Annotations Attributes in Data Transfer Objects Template Entity Developer 6.4.775

Post by Shalex » Wed 07 Aug 2019 10:35

Could you use a predefined template EF Core and set Validation Framework=Data Annotations in its properties? Default settings of EF Core will generate simple POCO classes. If EF Core doesn't suit your scenario, please explain why.

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

Re: Data Annotations Attributes in Data Transfer Objects Template Entity Developer 6.4.775

Post by Shalex » Thu 30 Sep 2021 13:02

The new property Validation Framework is implemented in the Data Transfer Object template for generating DataAnnotations attributes.

Refer to viewtopic.php?f=32&t=48304.

Post Reply