ObjectContext::SavingChanges Event
.NET Framework (current version)
Occurs when changes are saved to the data source.
Assembly: System.Data.Entity (in System.Data.Entity.dll)
The SavingChanges event is raised at the start of a SaveChanges operation on an ObjectContext. This event is typically used to validate changed objects before new values are written to the database.
This example is based on the AdventureWorks Sales Model. This registers a handler for the SavingChanges event that performs entity state validation.
.NET Framework
Available since 3.5
Available since 3.5
Show: