Sets the state of the specified object to be Modified and adds the passed object to the track list to be committed.
A persistent object whose state is the subject to be Modified.
For object changes that cannot be tracked via notification mechanisms exposed by the data layer, use the SetModified method. This method adds the object passed as the obj parameter to the list of objects to be committed
If you implement the IObjectSpace interface in the BaseObjectSpace class' descendant, you don't have to override the SetModified method. This method is implemented in the BaseObjectSpace class. The BaseObjectSpace.SetModified method invokes a protected virtual BaseObjectSpace.SetModified(Object obj, ObjectChangedEventArgs args) method. So, you should override the virtualCreateObjectCore method.
Note that you can raise the IObjectSpace.ObjectChanged event in your BaseOBjectSpace.SetModified method override. This event is handled internally, so that both a Detail View's Property Editor and a List View's List Editor will be refreshed in case their object has changed.
The objects that are currently in the Modified state are available via the IObjectSpace.ModifiedObjects property.