Changes coming for v0.0.2

Dec 3, 2009 at 7:17 PM

As of today, please anticipate these changes. They all apply to the EntityDAODataSource.

1. The Inserting, Inserted, Updating, Updated, Deleting, and Deleted events have been replaced by DataChanging and DataChanged events. The original events supported the underlying ObjectDataSourceView class. That class did not pass through the Entity instance that is being added, updated, or deleted. The ObjectDataSourceView has been abandoned for the ExecuteInsert, ExecuteUpdate, and ExecuteDelete methods (as there was no way to just swap out their event calls). The new DataChanging and DataChanged events are called for Update, Insert, and Delete operations. Their argument parameters specify the operation in the Operation property and entity instance in the Entity property. DataChanging still lets you cancel the action through the Cancel property. DataChanged still reports an exception and lets you handle it with the Exception and ExceptionHandled properties.

2. The Update method can now specify two Entity instance parameters, one for the original value and the other for the changed value. If you elect to define two Entity parameters, you must add the new UpdateMethodRulesAttribute to the EntityDAO class. It instructs the EntityDAODataSource to call the UpdateMethod with two parameters. It defines the order of those parameters too.

3. The ConflictDetection property has been removed. It was a feature from the ObjectDataSource that was used by its ExecuteUpdate method. Now with the optional two parameter Update method, you can handle this in the business logic. ConflictDetection was a case of supplying business rules to the web form develoepr.

If you have additional recommendations for changes, please let me know.