[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true)]
public sealed class ValueConverterAttribute :
<AttributeUsage(AttributeTargets.Field Or AttributeTargets.Property, Inherited:=True)>
Public NotInheritable Class ValueConverterAttribute
Use this attribute to associate a ValueConverter descendant type with a property to make it persistent. Refer to the Value Converters topic for details.
The value converter mechanism is designed to allow persisting non-persistent data types by transforming them into a persistable equivalent. Value converters are not intended for introducing encryption, compression, or other business logic into the persistence process.
Properties persisted using Value Converters require the client-side conversion logic, and should not be used in criteria expressions evaluated on the database server side. An attempt to use such properties in criteria may lead to undefined behavior. For instance, when a criterion is translated to a database query, a conversion implemented programmatically may not be applied or may be applied multiple times.