diff --git a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs index 18f4c4e11..f4f9c605f 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs @@ -629,7 +629,6 @@ namespace IRaCIS.Application.Services t => t.DoctorId == workLoadAddOrUpdateModel.DoctorId && t.TrialId == workLoadAddOrUpdateModel.TrialId, u => new Enroll() { EnrollStatus = (int)EnrollStatus.DoctorReading, - UpdateTime = DateTime.Now }); var success = await _doctorWorkloadRepository.SaveChangesAsync(); @@ -665,8 +664,6 @@ namespace IRaCIS.Application.Services Downtime = workLoadAddOrUpdateModel.Downtime, Training = workLoadAddOrUpdateModel.Training, Global = workLoadAddOrUpdateModel.Global, - UpdateTime = DateTime.Now, - UpdateUserId = userId, WorkTime = workLoadAddOrUpdateModel.WorkTime, YearMonth = yearMonthStr diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index a7785f634..c8f1d1f3a 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -8,6 +8,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore.ChangeTracking; using System.Reflection; +using EntityFramework.Exceptions.SqlServer; using IRaCIS.Core.Domain.Share; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -35,8 +36,11 @@ namespace IRaCIS.Core.Infra.EFCore protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { optionsBuilder.UseLoggerFactory(MyLoggerFactory) + .ReplaceService(); + optionsBuilder.UseExceptionProcessor(); + //var config = new ConfigurationBuilder() // .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true).Build(); //connectionString = config.GetSection("ConnectionStrings:RemoteNew").Value; diff --git a/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj b/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj index e67fa9b60..a04961a99 100644 --- a/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj +++ b/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj @@ -17,16 +17,16 @@ - - - + + + + - - + + -