Page 1 of 1

Data Annotations Attributes in Data Transfer Objects Template Entity Developer 6.4.775

Posted: Mon 05 Aug 2019 13:39
by PixelHunter
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!

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

Posted: Wed 07 Aug 2019 10:35
by Shalex
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.

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

Posted: Thu 30 Sep 2021 13:02
by Shalex
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.