Adding custom property attributes in Entity Framework code -


Is there any way to add custom properties of properties in EF code? The only thing I can see as a commendable solution will come with a custom T4 template. However, due to the nature of the attribute, it would be impossible to determine the exact attribute parameter per AF property.

You can do this by specifying a metadata type that reflects the properties and only attribution is used to. / P>

  [Metadata type (typewriter)] Public Partial Class Dinner {} Public Category Dinner_validation {[Required] Public String Title {get; Set; }}  

Steve Smith blogs about it.

Unfortunately, the above approach is brittle to reconstruction. Another option is to use new Poko institutions, these skeletal-time codes are completely escaped from generation to generation as far as I can tell. I have not used them so far, so can not comment about any loss or business.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -