PetaPoco icon indicating copy to clipboard operation
PetaPoco copied to clipboard

Add support for column value converters

Open tkouba opened this issue 7 years ago • 1 comments

Add attribute for custom column value converter. This is useful for storing .Net types to database, such as Image as VARBINARY, Color as INT32. For example:

[ImageValueConverter] public Image Icon { get; set; } [ColorValueConverter] public Color ForeColor { get; set; }

This could be done by simple modification of ConventionMapper default constructor and abstract ValueConverterAttribute.

See this gist for code example and usage.

tkouba avatar Jun 22 '17 06:06 tkouba

Please assign it to me.

tkouba avatar Jul 20 '17 06:07 tkouba