In one application I need to assing an ID to each added row before saving to the domaindatasource, in another I want to backup any deleted rows before saving.
What is the syntax in c# to iterate through the rows to check if they have been added or deleted before saving?
A better approach might be to do this when the DomainDataSource is submitting its changes. You could handle the SubmittingChanges event of the DomainDataSource and then use the ChangeSet property of its event args. This is of type EntityChangeSet and exposes the AddedEntities and RemovedEntities. Using these collections you could iterate through them and either set the ID on AddedEntities or store the DeletedEntities.