Comments (2)
I assume this is happening because the saveChanges() for modifications and deletion happen before the SaveChanges() of the create. We could split it out so that Delete happens first. Then SaveChanges() is called and saves away all the records plus the delete audits. Then do both the create and modify records together. The records should exist now so everything should save away correctly. Any negatives to this approach?
from tracker-enabled-dbcontext.
I am not sure @ScarlettCode if I understand everything correctly. But if you can implement what you suggested, I don't see any negatives.
PS: Does it increase the number of database hits ?
from tracker-enabled-dbcontext.
Related Issues (20)
- [DataType(DataType.Date)] HOT 1
- Entry as Modified not traking the changes. HOT 3
- Is there any to use it in Databse first ?
- error The entity type AuditLog is not part of the model for the current context HOT 7
- Static configuration is bad for multiple contexts HOT 2
- Given key was not present in the dictionary HOT 2
- Using of deprecated dependency EntityFramework.MappingAPI HOT 35
- Datetime2 conversion error when saving HOT 1
- System.Collections.Generic.KeyNotFoundException HOT 1
- Could not load file or assembly 'EntityFramework.MappingAPI, Version=6.1.0.9, Culture=neutral, PublicKeyToken=7ee2e825d201459e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) HOT 3
- Multiple SELECT queries with GlobalTrackingConfig.DisconnectedContext = true HOT 3
- TrackerIdentityContext only tracking related objects
- Nuget package HOT 11
- Target .netstandard2.1, netcoreapp3.1, and entity framework 6.3/6.4 HOT 2
- Getting AuditLogDetail for properties of complex types.
- Version to EntityFrameworkCore and Identity Core HOT 1
- Global level tracking does not work HOT 1
- No tracking done HOT 1
- AuditLogs inserted after SaveChanges fail + Reload HOT 1
- Support with Efcore 7 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tracker-enabled-dbcontext.