Reverting your changes
If validation of a record fails, you will not be able to commit the changes to the database. The safest solution is to revert the record to its original state and report an error.
To revert a record, call the Revert
method
of the Entity object.