# asp-net-core-dashboard-save-dashboards-to-database **Repository Path**: KIDXT/asp-net-core-dashboard-save-dashboards-to-database ## Basic Information - **Project Name**: asp-net-core-dashboard-save-dashboards-to-database - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: 18.1.3+ - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-08 - **Last Updated**: 2025-05-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README  [](https://supportcenter.devexpress.com/ticket/details/T830539) [](https://docs.devexpress.com/GeneralInformation/403183) [](#does-this-example-address-your-development-requirementsobjectives) # Dashboard for ASP.NET Core - How to load and save dashboards from/to a database *Files to look at*: * [Index.cshtml](./CS/SaveDashboardDB/Views/Home/Index.cshtml) * [DataBaseEditaleDashboardStorage.cs](./CS/SaveDashboardDB/Code/DataBaseEditaleDashboardStorage.cs) * [Startup.cs](./CS/SaveDashboardDB/Startup.cs#L30)
This example shows how to create a custom dashboard storage in an ASP.NET Core application to allow storing dashboards in a data base. It uses the System.Data.SqlClient members to connect to and operate an MS SQL server data base.
A custom dashboard storage should implement one of the following interfaces: IDashboardStorage or IEditableDashboardStorage.
IDashboardStorage provides the capability to open and edit dashboards available in the storage.
XDocument LoadDashboard(string dashboardID) - returns a dashboard by its ID in the XDocument format, which describes the dashboard's object model.
IEnumerable
void SaveDashboard(string dashboardID, XDocument dashboard) - updates the dashboard with new settings by its id.
IEditableDashboardStorage inherits the IDashboardStorage interface and contains one additional method that allows adding new dashboards to the storage.
string AddDashboard(XDocument dashboard, string dashboardName) - takes a dashboard definition with its caption, saves it to the data storage, and returns the ID of a new saved dashboard.
This example also contains an SQL query and a data base backup file, which can be used to recreate the data base used in this example on your side.
See also:
How to save dashboards created in ASPxDashboard to a DataSet
MVCxDashboard - How to save dashboards to a data base
This example applies to the Dashboard Designer for ASP.NET Core starting with v2017 vol 2. To learn how to achieve this goal in previous versions, refer to the OBSOLETE - ASPxDashboardDesigner - How to save dashboards to a data base example.