From 764460b609f7ded17897a293693dfa97b17d4e50 Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Mon, 27 May 2024 20:40:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EntityFrameworkCore/WebPeisDbContext.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Shentun.WebPeis.EntityFrameworkCore/EntityFrameworkCore/WebPeisDbContext.cs b/src/Shentun.WebPeis.EntityFrameworkCore/EntityFrameworkCore/WebPeisDbContext.cs index fc48c88..310561c 100644 --- a/src/Shentun.WebPeis.EntityFrameworkCore/EntityFrameworkCore/WebPeisDbContext.cs +++ b/src/Shentun.WebPeis.EntityFrameworkCore/EntityFrameworkCore/WebPeisDbContext.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Reflection; using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.ChangeTracking; using Shentun.Peis.EntityFrameworkCore; using Shentun.WebPeis.Models; using Volo.Abp.AuditLogging; @@ -246,5 +247,11 @@ public partial class WebPeisDbContext : AbpDbContext, modelBuilder.ToSnakeCase(); } + protected override void ApplyAbpConceptsForAddedEntity(EntityEntry entry) + { + base.ApplyAbpConceptsForAddedEntity(entry); + SetModificationAuditProperties(entry); + } + partial void OnModelCreatingPartial(ModelBuilder modelBuilder); }