Custom attributes per property / column

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
haveben
Posts: 4
Joined: Thu 03 Dec 2015 05:11

Custom attributes per property / column

Post by haveben » Fri 13 Jul 2018 17:37

I see where you can create attributes for the class / table in the settings, but I am needing to add custom attributes to each of the properties - mapping to the columns. I don't want them to be overwritten every time I regenerate the mapped model. Is there a way to define these using Entity Developer?

I am transitioning from Telerik ORM to Entity Framework in an Oracle environment. With Telerik, I believe the practice was to extend the partial class and include an internal sealed class with a duplicate version of all the properties where you could decorate with the DataAnnotation properties as well as custom ones.

Is this the same case with generating from Entity Developer to the DbSet template for EF?

Thanks,
Ben

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

Re: Custom attributes per property / column

Post by Shalex » Mon 16 Jul 2018 16:13

You should add custom attributes via interface of Entity Developer to preserve attributes during regeneration:

1) navigate to Model > Settings > Attributes > select the assembly with the needed attributes and make sure that the needed attributes are checked in the window below, press OK

2) select the needed attribute in the Attributes collection of a particular class property

Post Reply