The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.

InMemoryDataStore Class

Stores persistent objects in memory. Intended for testing environment.

Namespace: DevExpress.Xpo.DB

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public class InMemoryDataStore :
    DataStoreBase,
    IDataStoreSchemaExplorer,
    IDataStoreSchemaExplorerSp
Public Class InMemoryDataStore
    Inherits DataStoreBase
    Implements IDataStoreSchemaExplorer,
               IDataStoreSchemaExplorerSp
public class InMemoryDataStore :
    DataStoreBase,
    IDataStoreSchemaExplorer,
    IDataStoreSchemaExplorerSp
Public Class InMemoryDataStore
    Inherits DataStoreBase
    Implements IDataStoreSchemaExplorer,
               IDataStoreSchemaExplorerSp

Remarks

When a Session object uses the functionality of the InMemoryDataStore class, persistent objects will be stored to and loaded from RAM.

Examples

This example demonstrates how to store persistent objects in RAM.

To use RAM as a data store, a InMemoryDataStore object is created and passed to the SimpleDataLayer object constructor. The created SimpleDataLayer object is assigned to the XpoDefault.DataLayer property and will be used by any Session object when a connection to a data store is to be established.

Note

The InMemoryDataStore provider is designed primarily for testing and demo purposes. It is not intended to be used with large data sets.

using DevExpress.Xpo;
using DevExpress.Xpo.DB;

XpoDefault.DataLayer = new SimpleDataLayer(new InMemoryDataStore());

Inheritance

Object
DevExpress.Xpo.DB.DataStoreSerializedBase
DataStoreBase
InMemoryDataStore
See Also