% title # EditableObject class %> <% order # 1 %>
EditableObject is an object that provides functionality to commit and rollback changes to itself. After verifying the accuracy of changes made to the object, you can accept the changes using the AcceptChanges method of the object, which will set the Current field values to be the Original values. The RejectChanges method rejects all changes made to the object since AcceptChanges was last called. The IsDirty property gets a value that indicates whether the object has changed.
If we wrote an editable object manually, we could get the following code just for two editable properties:
<% Doc\EditableObjects\ManualEditableObject.cs %>BLToolkit allows implementing the same functionality by inheriting your object from the BLToolkit EditableObject base class and replacing editable members with abstract properties.
EditableObjectTest.cs <% ..\..\..\HowTo\EditableObjects\EditableObjectTest.cs %>BLToolkit type builder will generate the following for the class above:
<% Doc\EditableObjects\EditableObject.cs %>