diff --git a/New_College.Api/New_College.Api.csproj b/New_College.Api/New_College.Api.csproj
index 712b0b2..fcae1c7 100644
--- a/New_College.Api/New_College.Api.csproj
+++ b/New_College.Api/New_College.Api.csproj
@@ -52,7 +52,7 @@
-
+
diff --git a/New_College.Tests/DependencyInjection/DI_Test.cs b/New_College.Tests/DependencyInjection/DI_Test.cs
index 4704ed1..ade426d 100644
--- a/New_College.Tests/DependencyInjection/DI_Test.cs
+++ b/New_College.Tests/DependencyInjection/DI_Test.cs
@@ -22,6 +22,7 @@ using System.Reflection;
using System.Security.Claims;
using System.Text;
using Xunit;
+using Microsoft.Extensions.PlatformAbstractions;
namespace New_College.Tests
{
@@ -31,7 +32,7 @@ namespace New_College.Tests
[Fact]
public void DI_Connet_Test()
{
- var basePath = Microsoft.DotNet.PlatformAbstractions.ApplicationEnvironment.ApplicationBasePath;
+ var basePath = PlatformServices.Default.Application.ApplicationBasePath;
IServiceCollection services = new ServiceCollection();
services.AddAutoMapper(typeof(Startup));
@@ -43,7 +44,7 @@ namespace New_College.Tests
ConnectionString = GetMainConnectionDb().Connection,//必填, 数据库连接字符串
DbType = (SqlSugar.DbType)GetMainConnectionDb().DbType,//必填, 数据库类型
IsAutoCloseConnection = true,//默认false, 时候知道关闭数据库连接, 设置为true无需使用using或者Close操作
- IsShardSameThread = true,//共享线程
+ // sh = true,//共享线程
InitKeyType = SqlSugar.InitKeyType.SystemTable//默认SystemTable, 字段信息读取, 如:该属性是不是主键,标识列等等信息
});
});
@@ -108,7 +109,7 @@ namespace New_College.Tests
public IContainer DICollections()
{
- var basePath = Microsoft.DotNet.PlatformAbstractions.ApplicationEnvironment.ApplicationBasePath;
+ var basePath = PlatformServices.Default.Application.ApplicationBasePath;
IServiceCollection services = new ServiceCollection();
services.AddAutoMapper(typeof(Startup));
@@ -156,7 +157,7 @@ namespace New_College.Tests
ConnectionString = GetMainConnectionDb().Connection,//必填, 数据库连接字符串
DbType = (SqlSugar.DbType)GetMainConnectionDb().DbType,//必填, 数据库类型
IsAutoCloseConnection = true,//默认false, 时候知道关闭数据库连接, 设置为true无需使用using或者Close操作
- IsShardSameThread = true,//共享线程
+ // IsShardSameThread = true,//共享线程
InitKeyType = SqlSugar.InitKeyType.SystemTable//默认SystemTable, 字段信息读取, 如:该属性是不是主键,标识列等等信息
});
});
diff --git a/New_College.Tests/New_College.Tests.csproj b/New_College.Tests/New_College.Tests.csproj
index 15964b1..1bcfb3c 100644
--- a/New_College.Tests/New_College.Tests.csproj
+++ b/New_College.Tests/New_College.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ net6.0
false
@@ -18,9 +18,10 @@
-
-
-
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive