Skip to main content

ImageValueConverter.StorageType Property

Gets the type that the property’s value is converted to when it’s saved in a data store.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v24.2.dll

Declaration

public override Type StorageType { get; }

Property Value

Type Description
Type

The Type which the property’s value is converted to and saved in a data store.

Remarks

The StorageType property returns the Type object for a System.Byte[] object.

Example

The following example shows how to convert the value of the Image property to an array of bytes when saving it in a data store.

using DevExpress.Xpo;

public class SampleImageClass : XPObject {
    private System.Drawing.Image image;
    public SampleImageClass(Session session) : base(session) {}

    [ValueConverter(typeof(DevExpress.Xpo.Metadata.ImageValueConverter))]
    public System.Drawing.Image Image {
        get { return image; }
        set {
            SetPropertyValue(nameof(Image) , ref image, value);
        }
    }
}
See Also