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());
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the InMemoryDataStore class.
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.