Skip to content

Commit 357209d

Browse files
committed
update cs solution
1 parent 24234cd commit 357209d

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

CS/WebDashboardAspNetCore/Code/DashboardUtils.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ public static DashboardConfigurator CreateDashboardConfigurator(IConfiguration c
1616

1717
configurator.SetDataSourceStorage(new DataSourceInMemoryStorage());
1818

19-
configurator.SetDBSchemaProvider(new CustomDBSchemaProvider());
20-
// configurator.SetDBSchemaProvider(new MyDBSchemaProvider());
21-
19+
// This method assigns the database schema provider to the Web Dashboard.
20+
// Uncomment one of the following lines depending on the needed provider.
21+
configurator.SetDBSchemaProvider(new ManualDBSchemaProvider());
22+
// configurator.SetDBSchemaProvider(new LimitDBSchemaProvider());
2223

2324
return configurator;
2425
}

CS/WebDashboardAspNetCore/MyDBSchemaProvider.cs renamed to CS/WebDashboardAspNetCore/LimitDBSchemaProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
using System.Linq;
44

55
namespace WebDashboardAspNetCore {
6-
public class MyDBSchemaProvider : IDBSchemaProviderEx {
6+
public class LimitDBSchemaProvider : IDBSchemaProviderEx {
77
DBSchemaProviderEx provider;
8-
public MyDBSchemaProvider() {
8+
public LimitDBSchemaProvider() {
99
this.provider = new DBSchemaProviderEx();
1010
}
1111

CS/WebDashboardAspNetCore/CustomDBSchemaProvider.cs renamed to CS/WebDashboardAspNetCore/ManualDBSchemaProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Collections.Specialized;
44

55
namespace WebDashboardAspNetCore {
6-
public class CustomDBSchemaProvider : IDBSchemaProviderEx {
6+
public class ManualDBSchemaProvider : IDBSchemaProviderEx {
77
DBTable[] tables;
88
public void LoadColumns(SqlDataConnection connection, params DBTable[] tables) {
99
// Loads the specified columns in the Categories and Products tables.
@@ -24,7 +24,7 @@ public void LoadColumns(SqlDataConnection connection, params DBTable[] tables) {
2424
DBForeignKey foreignKey = new DBForeignKey(
2525
new[] { categoryIdColumn },
2626
"Categories",
27-
CustomDBSchemaProvider.CreatePrimaryKeys("CategoryID"));
27+
ManualDBSchemaProvider.CreatePrimaryKeys("CategoryID"));
2828
table.ForeignKeys.Add(foreignKey);
2929
}
3030
}

CS/WebDashboardAspNetCore/appsettings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77
},
88
"ConnectionStrings": {
99
"NWindConnectionString": "XpoProvider=SQLite;Data Source=Data/nwind.db"
10-
1110
}
12-
}
11+
}

CS/WebDashboardAspNetCore/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "webdashboardaspnetcore",
33
"version": "1.0.0",
44
"private": true,
5-
"dependencies": {
6-
"devextreme": "21.2.8",
7-
"@devexpress/analytics-core": "21.2.8",
8-
"devexpress-dashboard": "21.2.8",
9-
"jquery-ui-dist": "^1.12.1"
10-
}
5+
"dependencies": {
6+
"devextreme": "21.2.8",
7+
"@devexpress/analytics-core": "21.2.8",
8+
"devexpress-dashboard": "21.2.8",
9+
"jquery-ui-dist": "^1.12.1"
10+
}
1111
}

0 commit comments

Comments
 (0)