Back to Devexpress

MediaDataObject Class

expressappframework-devexpress-dot-persistent-dot-baseimpl-dot-ef-d52243e2.md

latest3.2 KB
Original Source

MediaDataObject Class

The entity used to store media data in the database.

Namespace : DevExpress.Persistent.BaseImpl.EF

Assembly : DevExpress.Persistent.BaseImpl.EFCore.v25.2.dll

NuGet Package : DevExpress.Persistent.BaseImpl.EFCore

Declaration

csharp
[Browsable(false)]
[EditorAlias("ImagePropertyEditor")]
[MediaDataObject("MediaDataKey", "MediaData", "MediaResource.MediaData")]
public class MediaDataObject :
    BaseObjectWithNotifyPropertyChanged,
    IEmptyCheckable
vb
<MediaDataObject("MediaDataKey", "MediaData", "MediaResource.MediaData")>
<Browsable(False)>
<EditorAlias("ImagePropertyEditor")>
Public Class MediaDataObject
    Inherits BaseObjectWithNotifyPropertyChanged
    Implements IEmptyCheckable

Remarks

You can use the MediaDataObject type to declare a reference property of a business class that is used to store and display an image.

WinForms and ASP.NET Core Blazor Image Property Editors are used automatically for properties of the MediaDataObject type.

You can find an example in the BLOB Image Properties in EF Core topic.

MediaDataObject is a container for three values:

Currently, the Winforms and Blazor editors ( ImagePropertyEditor ) support the MediaDataObject property type partially - they use MediaData only, and do not provide caching.

Note

It is not recommend to change the MediaData value by direct database queries. In this instance, the URL will not change, and it will be required to manually refresh the page to see the changes.

Implements

IXafEntityObject

IObjectSpaceLink

IEmptyCheckable

Inheritance

Object BaseObject BaseObjectWithNotifyPropertyChanged MediaDataObject

See Also

MediaDataObject Members

DevExpress.Persistent.BaseImpl.EF Namespace