The EODS control has many similarities with the CODS but provides a more orthogonal interface for the select operation and the possibility to cache data if sorting and filtering are used.If you have used the Object Data Source, the learning curve for the controls present in the Extended Object Data Source package is minimal (actually close to null).To supply a custom instance, the Object Instance property of the event arguments has to be assigned.If we are using the Object Data Source control and our Select Method has paging we can not let the user edit data using a Grid View without having to write some code to handle events in the Object Data Source lifecycle. With paging enabled, if we delete all the rows in the current page, the Grid View disappears instead of going to the previous page as we would probably expect. Well, when we delete a row in the Grid View, it calls the Object Data Source View's Delete method and after the deletion has been performed, a callback notifies the Grid View that the delete operation was completed.This operations are very expensive and can have an impact on our site performance if we use the Object Data Source in many places and have enough traffic.The CODS and the EODS control cache the information about the method to call (we can control the caching information with the properties Enable Reflection Caching, Cache Method Info Duration and Cache Method Info Expiration Policy) and invoke it using dynamically generated MSIL instead of using reflection, obtaining a 2000% performance increase.This filtering does not expect that the data returned from the Select method is a Data Set, Data Table or Data View as it expects the select method to do the filtering.
Every time the Object Data Source executes a Select, Insert, Update or Delete operation it needs to explore the type associated with it, find all the methods, iterate trough them to see if all the parameters of the method match what the control expects, and then invoke the method using reflection.
Does not make more sense to return the total number of row in the select method? The EODS has a property called Total Row Count Parameter Name.
If we have enabled paging, the control will search for an additional parameter in the Select Method (an output parameter) called as specified by the Total Row Count Parameter Name property that will return the total row count.
The Object Data Source control filtering support is minimal (only available if our select method returns a Data Set, Data Table or Data View).
If we specify a Filter Expression and the Filter Parameters, , the Filter Expression is evaluated and the control sets the Row Filter property of the underlying Data View, so the filtering is done by the Data View and not at the database level.