From 71fad05411f6384db218da3f5f31cfe69a55e29f Mon Sep 17 00:00:00 2001 From: hang <87227557@qq.com> Date: Fri, 30 Aug 2024 23:47:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7nuget=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRC.Core.SCP/IRC.Core.SCP.csproj | 25 ++++++----- IRaCIS.Core.API/IRaCIS.Core.API.csproj | 8 ++-- IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs | 2 +- .../IRaCIS.Core.Application.csproj | 12 +++--- IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj | 2 +- .../IRaCIS.Core.Infra.EFCore.csproj | 6 +-- .../IRaCIS.Core.Infrastructure.csproj | 8 ++-- IRaCIS.Core.Test/IRaCIS.Core.Test.csproj | 11 +---- IRaCIS.Core.Test/Test/Audit/AuditContext.cs | 43 ------------------- 9 files changed, 32 insertions(+), 85 deletions(-) delete mode 100644 IRaCIS.Core.Test/Test/Audit/AuditContext.cs diff --git a/IRC.Core.SCP/IRC.Core.SCP.csproj b/IRC.Core.SCP/IRC.Core.SCP.csproj index 1f41904c0..afc7bbd18 100644 --- a/IRC.Core.SCP/IRC.Core.SCP.csproj +++ b/IRC.Core.SCP/IRC.Core.SCP.csproj @@ -7,26 +7,25 @@ - + - - - - - - - + + + + + + - + true - + - - - + + + diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.csproj b/IRaCIS.Core.API/IRaCIS.Core.API.csproj index 75a98c8da..d10c90832 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.csproj +++ b/IRaCIS.Core.API/IRaCIS.Core.API.csproj @@ -75,12 +75,12 @@ - + - - + + - + diff --git a/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs b/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs index 9cabfec27..a58f759f1 100644 --- a/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs +++ b/IRaCIS.Core.API/_ServiceExtensions/EFSetup.cs @@ -41,7 +41,7 @@ namespace IRaCIS.Core.API var dbType = configuration.GetSection("ConnectionStrings:Db_Type").Value ; if (!string.IsNullOrWhiteSpace(dbType) && dbType == "pgsql") { - options.UseNpgsql(@"Host=106.14.89.110;Port=5432;Username=sa;Password=pgsql_pwd;Database=Test2_PG"); + options.UseNpgsql(configuration.GetSection("ConnectionStrings:RemoteNew").Value, contextOptionsBuilder => contextOptionsBuilder.EnableRetryOnFailure()); } else diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj b/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj index 37ecfb7ae..4f27873ad 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.csproj @@ -58,24 +58,24 @@ - + - - + + - + - + - + diff --git a/IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj b/IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj index 80a3e8702..15c6078d5 100644 --- a/IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj +++ b/IRaCIS.Core.Domain/IRaCIS.Core.Domain.csproj @@ -17,7 +17,7 @@ - + diff --git a/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj b/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj index bbedc4058..0f0f66b72 100644 --- a/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj +++ b/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj @@ -19,11 +19,11 @@ - + - - + + diff --git a/IRaCIS.Core.Infrastructure/IRaCIS.Core.Infrastructure.csproj b/IRaCIS.Core.Infrastructure/IRaCIS.Core.Infrastructure.csproj index 39d3b1d66..e952396a9 100644 --- a/IRaCIS.Core.Infrastructure/IRaCIS.Core.Infrastructure.csproj +++ b/IRaCIS.Core.Infrastructure/IRaCIS.Core.Infrastructure.csproj @@ -11,14 +11,14 @@ - + - + - + - + diff --git a/IRaCIS.Core.Test/IRaCIS.Core.Test.csproj b/IRaCIS.Core.Test/IRaCIS.Core.Test.csproj index 2d9915d1d..0be844e14 100644 --- a/IRaCIS.Core.Test/IRaCIS.Core.Test.csproj +++ b/IRaCIS.Core.Test/IRaCIS.Core.Test.csproj @@ -12,16 +12,6 @@ ..\bin - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - IRaCIS .Core.ServiceAsync.cs @@ -105,6 +95,7 @@ + diff --git a/IRaCIS.Core.Test/Test/Audit/AuditContext.cs b/IRaCIS.Core.Test/Test/Audit/AuditContext.cs deleted file mode 100644 index 2fc55e0ea..000000000 --- a/IRaCIS.Core.Test/Test/Audit/AuditContext.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore; - -#region AuditContext -public class AuditContext : DbContext -{ - private readonly string _connectionString; - - public AuditContext(string connectionString) - { - _connectionString = connectionString; - } - - //protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - // => optionsBuilder.Usesq(_connectionString); - - public DbSet SaveChangesAudits { get; set; } -} - - -public class SaveChangesAudit -{ - public int Id { get; set; } - public Guid AuditId { get; set; } - public DateTime StartTime { get; set; } - public DateTime EndTime { get; set; } - public bool Succeeded { get; set; } - public string ErrorMessage { get; set; } - - public ICollection Entities { get; } = new List(); -} - -public class EntityAudit -{ - public int Id { get; set; } - public EntityState State { get; set; } - public string AuditMessage { get; set; } - - public SaveChangesAudit SaveChangesAudit { get; set; } -} - -#endregion \ No newline at end of file