Skip to main content

DataSourceInMemoryStorage Class

An in-memory storage of the dashboard data sources.

Namespace: DevExpress.DashboardWeb

Assembly: DevExpress.Dashboard.v22.1.Web.dll

Declaration

public class DataSourceInMemoryStorage :
    IDataSourceStorage

Remarks

To create the storage of the dashboard data sources that will be available in the Web Dashboard’s UI for end-users, call the ASPxDashboard.SetDataSourceStorage / DashboardConfigurator.SetDataSourceStorage method. You can use a predefined implementation of the in-memory storage (DataSourceInMemoryStorage) or you can implement the IDataSourceStorage interface to provide a custom data source storage.

Example

The following code snippet shows how to create the in-memory storage of data sources for the Web Dashboard control.

View Example

DashboardSqlDataSource sqlDataSource = new DashboardSqlDataSource("SQL Data Source", "sqlConnection");
SelectQuery countriesQuery = SelectQueryFluentBuilder
    .AddTable("Countries")
    .SelectColumns("Country", "Latitude", "Longitude", "Year", "EnergyType", "Production", "Import")
    .Build("Countries");
sqlDataSource.Queries.Add(countriesQuery);

DashboardOlapDataSource olapDataSource = new DashboardOlapDataSource("OLAP Data Source", "olapConnection");

DataSourceInMemoryStorage dataSourceStorage = new DataSourceInMemoryStorage();
dataSourceStorage.RegisterDataSource("sqlDataSource1", sqlDataSource.SaveToXml());
dataSourceStorage.RegisterDataSource("olapDataSource1", olapDataSource.SaveToXml());
ASPxDashboard1.SetDataSourceStorage(dataSourceStorage);

The following code snippets (auto-collected from DevExpress Examples) contain references to the DataSourceInMemoryStorage class.

Note

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.

Implements

Inheritance

Object
DataSourceInMemoryStorage
See Also