ow
This commit is contained in:
1 parent
dc1c073ac6
commit
20abc22653
38 files changed
+143
-40
No files matched your search
@@ -27,6 +27,7 @@ namespace CloudBuilder.Core.DatabaseAccessor
|
||||
private readonly IConfiguration configuration;
|
||||
private readonly IHttpContextAccessor httpContextAccessor;
|
||||
private FileLog fileLog;
|
||||
public bool SkipAudit { get; set; } = false;
|
||||
|
||||
public MasterDbContext(DbContextOptions<MasterDbContext> options,
|
||||
IEnumerable<IMasterRegistEntityType<ModelBuilder>> entityManagers,
|
||||
@@ -67,6 +68,8 @@ namespace CloudBuilder.Core.DatabaseAccessor
|
||||
|
||||
public void SavingChangesEvent()
|
||||
{
|
||||
if (SkipAudit) return;
|
||||
|
||||
var entities = this.ChangeTracker.Entries()
|
||||
.Where(u => (u.State == EntityState.Modified || u.State == EntityState.Deleted || u.State == EntityState.Added)).ToList();
|
||||
if (entities == null || entities.Count < 1) return;
|
||||
|
||||
Reference in new issue
Block a user