!6 ADD 达梦数据库适配。

Merge pull request !6 from Peng Sir/master
This commit is contained in:
Sam 2023-05-18 04:35:13 +00:00 committed by Gitee
commit e2af6d57b7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 18 additions and 5 deletions

View File

@ -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;
}

View File

@ -28,7 +28,7 @@ namespace WalkingTec.Mvvm.Core
/// <summary>
/// 数据库类型
/// </summary>
public enum DBTypeEnum { SqlServer, MySql, PgSql, Memory, SQLite, Oracle }
public enum DBTypeEnum { SqlServer, MySql, PgSql, Memory, SQLite, Oracle, DaMeng }
/// <summary>
/// 页面显示方式

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Description>WalkingTec.Mvvm</Description>
@ -42,4 +42,13 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="DmProvider">
<HintPath>Lib\DmProvider.dll</HintPath>
</Reference>
<Reference Include="Microsoft.EntityFrameworkCore.Dm">
<HintPath>Lib\Microsoft.EntityFrameworkCore.Dm.dll</HintPath>
</Reference>
</ItemGroup>
</Project>