Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Edited Issue: DisplayAttribute Name property called instead of GetName [988]

$
0
0
At line 15 of class System.Data.Entity.Utilities.ValidationContextExtensions.cs, you are using the property Name instead of calling the method GetName to get a localized string of the display name. This means that the ResourceType of the DisplayAttribute is ignored and will return the name of the resource instead of the localized resource.

Now: var displayName = displayAttribute == null ? null : displayAttribute.Name;
Should be: var displayName = displayAttribute == null ? null : displayAttribute.GetName();



Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>