How can I get EF Power Tools to add the Data Annotation Attribute StringLength when reverse engineering an existing database into a Code First model?
Asked
Active
Viewed 276 times
1
-
This one is much clearer than your last one, but you might want to include the research bits you added to your last question. – Robert Harvey Feb 16 '14 at 07:15
-
Out of curiosity, have you considered editing the templates yourself? – Robert Harvey Feb 16 '14 at 07:17
1 Answers
1
Yes.You can do that.If you look in the mapping classes (those are the ones in the Mapping folder) you’ll see that ‘Reverse Engineer Code First’ uses the Fluent API for all it’s configuration.If you need to do these things by using DataAnnotation, Please follow the below mentioned article for step by step guide.
Customizing ‘Reverse Engineer Code First’ In The EF Power Tools

Sampath
- 63,341
- 64
- 307
- 441