Skip to main content
A newer version of this page is available. .

DataSourceInMemoryStorage Class

An in-memory storage of the dashboard data sources.

Namespace: DevExpress.DashboardWeb

Assembly: DevExpress.Dashboard.v18.2.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 Designer.

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);

Implements

Inheritance

Object
DataSourceInMemoryStorage
See Also