I'm started to realized that when I draw a Model or generated a model from data base the annotations of Key
or Required
are not setting despite that in the model appears like for example the attributes wich are identity are painted like that. It's something wrong? do i need to change some configurations in the edmx file???
Why edmx diagram doesn't create the data annotations
427 views Asked by Jorge At
1
No it is not wrong. Simply EDMX is mapping and it has nothing to do with validation attributes. EDMX itself also doesn't generate code. It is responsibility either of custom tool or T4 template. Default implementations of these generators don't use data annotations. You must either add them manually through buddy classes or modify T4 template to generate them.