I had successful implement a type converter to convert DB varbinary type to Image type in .net, but I must manual edit the generate code to replace System.Byte[] to System.Drawing.Image. Can I do this in the desinger?
the code llblgen genarate is:
public virtual System.Byte[] HinhAnh
{
get { return (System.Byte[])GetValue((int)NhanVienFieldIndex.HinhAnh, true); }
set { SetValue((int)NhanVienFieldIndex.HinhAnh, value, true); }
}
private void InitNhanVienEntityInfos()
{
this.AddElementFieldInfo("NhanVienEntity", "HinhAnh", typeof(**System.Byte[]**), false, false, false, true, (int)NhanVienFieldIndex.HinhAnh, 2147483647, 0, 0);
}
private void InitNhanVienEntityMappings()
{
this.AddElementFieldMapping( "NhanVienEntity", "HinhAnh", "HinhAnh", true, "VarBinary", 2147483647, 0, 0, false, "", new **ImageByteConverter()**, typeof(**System.Byte[]**), 12 );
}
but I want replace all System.Byte[] by System.Drawing.Image in the above code