Back to Devexpress

SQL Data Source

dashboard-401437-web-dashboard-integrate-dashboard-component-dashboard-backend-prepare-data-source-storage-for-the-aspnet-mvc-framework-sql-data-source.md

latest1.9 KB
Original Source

SQL Data Source

  • Jul 18, 2025
  • 2 minutes to read

This tutorial shows how to add the DashboardSqlDataSource to an in-memory data source storage, and make it available to users. The sample MDF database supplies the dashboard with data.

  1. In your application, add the NWind.mdf database to the App_Data folder from the C:\Users\Public\Documents\DevExpress Demos 25.2\Components\Data directory.

  2. In Web.config , specify a connection string to the database.

  3. In the dashboard configuration file (for example, DashboardConfig.cs / DashboardConfig.vb), create a public method that returns the configured dashboard’s data source storage (DataSourceInMemoryStorage) and define the SQL data source.

  4. Call the DashboardConfigurator.SetDataSourceStorage method to configure the data source storage. Use the created CreateDataSourceStorage method as the SetDataSourceStorage parameter.

The SQL Data Source is now available in the Web Dashboard:

Users can bind dashboard items to data in the Web Dashboard’s UI.

Example

The example shows how to make a set of data sources available for users in the Web Dashboard application.

View Example: How to Register Data Sources for the ASP.NET MVC Dashboard Extension