I am writing a piece of software that will act as a middle man between some warehouse management software and automated vehicle hardware. My program has an entity model of a DB that lives on a server.
The vehicle hardware we are using comes with some software that allows it to read and write to a DB.
I would like to set up events in my entity models that would fire when a particular field is updated.
In example: The vehicle might encounter an error, it would then write some values to a table in the DB. My program then needs to recognize this change and inform the WM software.
This solution needs to be event driven as I can not sacrifice CPU to constantly poll the DB for changes
I have seen many solutions to this by overriding the SaveChanges() method for the entity, however it appears to me that would only work if the changes are coming from the application itself, not from an outside source.
Is this possible? Does EF have this built in and im just not seeing it?
When the physical DB updates does EF call saveChanges()?
Many Thanks