Open gediminas-eldorado opened 1 year ago
This is something that should be possible via the new LINQ expression tree interceptor, though it's probably not trivial to do.
We were also thinking that this could be achieved via computed columns, but a solution not resorting to raw sql queries does seem cleaner.
I implemented something similar for bulk deletes, to implement soft-delete functionality. Might be useful to others, this requirement (e.g., set audit fields) would be very easy to implement, actually: https://asp-blogs.azurewebsites.net/ricardoperes/soft-deletes-with-entity-framework-core-bulk-deletes
In our app, we have some rules, which we want applied always, when a save to database happens.
For example: set modified date.
Previously, this could easily be achieved with interceptors.
Now, with bulk updates, it seems that this logic needs to be included manually to each bulk update command.
Question: Is there a way to intercept bulk update operations currently? If not, is there a possibility for this in the future?
Thanks.