Stores persistent objects in memory. Intended for testing environment.
When a Session object uses the functionality of the InMemoryDataStore class, persistent objects will be stored to and loaded from RAM.
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.
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());