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
Public Class DataSourceInMemoryStorage
    Implements IDataSourceStorage

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.

Examples

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

Inheritance

Object
DataSourceInMemoryStorage

Implements

See Also