Page 1 of 1

Attribute bug

Posted: Thu 18 Aug 2011 14:35
by johnwest80
I added the DataAnnotations Display attribute to a property in the model, then removed it. However, the generated code still has seems to think it's there, based on the generated code below.

[System.ComponentModel.DataAnnotations.Display(Name = @"Improvement Factors Group")]

I think this is a bug. If I remove the attribute from the model, it shouldn't show in generated code any longer.

Thanks.

Posted: Thu 18 Aug 2011 14:37
by johnwest80
I went and looked at the edmx xml, and it is in fact still there.

While I'm commenting on attributes, can you also change it so that only the properties of the attributes I change from default are shown in the xml? Right now, even though I only set the name property on the Display attribute, all the properties are generated in the xml file.

Posted: Tue 23 Aug 2011 14:43
by StanislavK
The first issue may occur, e.g., if you've saved the model but did not regenerate the code. If this is not the case, could you please send us a model with which you are getting this problem?

Besides, thank you for your suggestion on saving attribute properties. We will consider implementing it and will inform you about the results.

Posted: Fri 07 Oct 2011 09:40
by StanislavK
We have implemented filtering attribute properties with default values in the model file. This change is available in the latest 4.1.55 build of Entity Developer (and in the new builds of data providers as well). The new build of Entity Developer can be downloaded from
http://www.devart.com/entitydeveloper/download.html
(the trial and free versions only) or from Registered Users' Area (for users with active subscription only).

For more information about the fixes and improvements available in the new build, please refer to
http://www.devart.com/forums/viewtopic.php?t=22169