diff --git a/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/DataContext.cs b/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/DataContext.cs
index cc7cc9c..19eb933 100644
--- a/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/DataContext.cs
+++ b/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/DataContext.cs
@@ -1,3 +1,4 @@
+using Dm;
using Microsoft.Data.SqlClient;
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
@@ -6,9 +7,6 @@ using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.Logging;
-using Microsoft.Extensions.Logging.Console;
-using Microsoft.Extensions.Logging.Debug;
-using Microsoft.Extensions.Options;
using MySqlConnector;
using Npgsql;
using System;
@@ -649,6 +647,9 @@ namespace WalkingTec.Mvvm.Core
}
});
break;
+ case DBTypeEnum.DaMeng:
+ optionsBuilder.UseDm(CSName);
+ break;
default:
break;
}
@@ -787,6 +788,9 @@ namespace WalkingTec.Mvvm.Core
case DBTypeEnum.Oracle:
//rv = new OracleParameter(name, value) { Direction = dir };
break;
+ case DBTypeEnum.DaMeng:
+ rv = new DmParameter(name, value) { Direction = dir };
+ break;
}
return rv;
}
diff --git a/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/Enums.cs b/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/Enums.cs
index d3ba0a4..81efd12 100644
--- a/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/Enums.cs
+++ b/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/Enums.cs
@@ -28,7 +28,7 @@ namespace WalkingTec.Mvvm.Core
///
/// 数据库类型
///
- public enum DBTypeEnum { SqlServer, MySql, PgSql, Memory, SQLite, Oracle }
+ public enum DBTypeEnum { SqlServer, MySql, PgSql, Memory, SQLite, Oracle, DaMeng }
///
/// 页面显示方式
diff --git a/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/Lib/DmProvider.dll b/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/Lib/DmProvider.dll
new file mode 100644
index 0000000..0330d76
Binary files /dev/null and b/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/Lib/DmProvider.dll differ
diff --git a/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/Lib/Microsoft.EntityFrameworkCore.Dm.dll b/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/Lib/Microsoft.EntityFrameworkCore.Dm.dll
new file mode 100644
index 0000000..e77df8d
Binary files /dev/null and b/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/Lib/Microsoft.EntityFrameworkCore.Dm.dll differ
diff --git a/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/WalkingTec.Mvvm.Core.csproj b/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/WalkingTec.Mvvm.Core.csproj
index 5d4e16d..6e993f7 100644
--- a/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/WalkingTec.Mvvm.Core.csproj
+++ b/WalkingTec.Mvvm/WalkingTec.Mvvm.Core/WalkingTec.Mvvm.Core.csproj
@@ -1,4 +1,4 @@
-
+
net6.0
WalkingTec.Mvvm
@@ -42,4 +42,13 @@
+
+
+ Lib\DmProvider.dll
+
+
+ Lib\Microsoft.EntityFrameworkCore.Dm.dll
+
+
+